[webkit-reviews] review granted: [Bug 122395] Pass VM instead of ExecState to StringObject constructor. : [Attachment 213475] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Oct 5 18:10:35 PDT 2013


Sam Weinig <sam at webkit.org> has granted Andreas Kling <akling at apple.com>'s
request for review:
Bug 122395: Pass VM instead of ExecState to StringObject constructor.
https://bugs.webkit.org/show_bug.cgi?id=122395

Attachment 213475: Patch
https://bugs.webkit.org/attachment.cgi?id=213475&action=review

------- Additional Comments from Sam Weinig <sam at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=213475&action=review


> Source/JavaScriptCore/runtime/StringConstructor.cpp:98
>      if (!exec->argumentCount())
> -	   return JSValue::encode(StringObject::create(exec,
globalObject->stringObjectStructure()));
> +	   return JSValue::encode(StringObject::create(exec->vm(),
globalObject->stringObjectStructure()));
>      
> -    return JSValue::encode(StringObject::create(exec,
globalObject->stringObjectStructure(),
exec->uncheckedArgument(0).toString(exec)));
> +    return JSValue::encode(StringObject::create(exec->vm(),
globalObject->stringObjectStructure(),
exec->uncheckedArgument(0).toString(exec)));

You are doing exec->vm() twice.  Can you pull it out into a local?

> Source/WebCore/bindings/js/SerializedScriptValue.cpp:1599
> +	       StringObject* obj = constructString(m_exec->vm(),
m_globalObject, jsEmptyString(&m_exec->vm()));

You are doing m_exec->vm() twice here.	Can you pull it out into a local?


More information about the webkit-reviews mailing list