Summary: | Pass VM instead of ExecState to StringObject constructor. | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andreas Kling <kling> | ||||
Component: | JavaScriptCore | Assignee: | Andreas Kling <kling> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | alecflett, commit-queue, jsbell, kling | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Andreas Kling
2013-10-05 16:47:46 PDT
Created attachment 213475 [details]
Patch
Comment on attachment 213475 [details] Patch 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? Committed r156998: <http://trac.webkit.org/changeset/156998> |