WebKit Bugzilla
Attachment 359672 Details for
Bug 193646
: [JSC] Lazily initialize JSModuleLoader
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193646-20190120231842.patch (text/plain), 4.27 KB, created by
Yusuke Suzuki
on 2019-01-20 23:18:43 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Yusuke Suzuki
Created:
2019-01-20 23:18:43 PST
Size:
4.27 KB
patch
obsolete
>Subversion Revision: 240229 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index dbc7d46ad189e0e9407da5935177173aa925c0b8..4664d93a3f202ad9e5ba24bd2648c9d72c392d22 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,18 @@ >+2019-01-20 Yusuke Suzuki <ysuzuki@apple.com> >+ >+ [JSC] Lazily initialize JSModuleLoader >+ https://bugs.webkit.org/show_bug.cgi?id=193646 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Lazily initialize JSModuleLoader so that we do not need to initialize it until we need modules. >+ >+ * runtime/JSGlobalObject.cpp: >+ (JSC::JSGlobalObject::init): >+ (JSC::JSGlobalObject::visitChildren): >+ * runtime/JSGlobalObject.h: >+ (JSC::JSGlobalObject::moduleLoader const): >+ > 2019-01-20 Saam Barati <sbarati@apple.com> > > DFG: When inlining DataView set* intrinsics we need to set undefined as our result >diff --git a/Source/JavaScriptCore/runtime/JSGlobalObject.cpp b/Source/JavaScriptCore/runtime/JSGlobalObject.cpp >index e540048ed8a8b790d9d86dd91901fef85f4c9a7f..43d95081ec69d21f1be956743d224f4ab7c9c961 100644 >--- a/Source/JavaScriptCore/runtime/JSGlobalObject.cpp >+++ b/Source/JavaScriptCore/runtime/JSGlobalObject.cpp >@@ -788,9 +788,13 @@ putDirectWithoutTransition(vm, vm.propertyNames-> jsName, lowerName ## Construct > ReflectObject* reflectObject = ReflectObject::create(vm, this, ReflectObject::createStructure(vm, this, m_objectPrototype.get())); > putDirectWithoutTransition(vm, vm.propertyNames->Reflect, reflectObject, static_cast<unsigned>(PropertyAttribute::DontEnum)); > >- m_moduleLoader.set(vm, this, JSModuleLoader::create(globalExec(), vm, this, JSModuleLoader::createStructure(vm, this, jsNull()))); >+ m_moduleLoader.initLater( >+ [] (const Initializer<JSModuleLoader>& init) { >+ init.set(JSModuleLoader::create(globalExec(), vm, this, JSModuleLoader::createStructure(vm, this, jsNull()))); >+ }); >+ > if (Options::exposeInternalModuleLoader()) >- putDirectWithoutTransition(vm, vm.propertyNames->Loader, m_moduleLoader.get(), static_cast<unsigned>(PropertyAttribute::DontEnum)); >+ putDirectWithoutTransition(vm, vm.propertyNames->Loader, moduleLoader(), static_cast<unsigned>(PropertyAttribute::DontEnum)); > > JSFunction* builtinLog = JSFunction::create(vm, this, 1, vm.propertyNames->emptyIdentifier.string(), globalFuncBuiltinLog); > JSFunction* builtinDescribe = JSFunction::create(vm, this, 1, vm.propertyNames->emptyIdentifier.string(), globalFuncBuiltinDescribe); >@@ -1574,7 +1578,7 @@ void JSGlobalObject::visitChildren(JSCell* cell, SlotVisitor& visitor) > visitor.append(thisObject->m_functionProtoHasInstanceSymbolFunction); > thisObject->m_throwTypeErrorGetterSetter.visit(visitor); > visitor.append(thisObject->m_throwTypeErrorArgumentsCalleeAndCallerGetterSetter); >- visitor.append(thisObject->m_moduleLoader); >+ thisObject->m_moduleLoader.visit(visitor); > > visitor.append(thisObject->m_objectPrototype); > visitor.append(thisObject->m_functionPrototype); >diff --git a/Source/JavaScriptCore/runtime/JSGlobalObject.h b/Source/JavaScriptCore/runtime/JSGlobalObject.h >index d52d0fbfc9828e69666af5b52014b8f39c6e56ef..b1d96ad3b58584b722871c682b18071aab9c42fa 100644 >--- a/Source/JavaScriptCore/runtime/JSGlobalObject.h >+++ b/Source/JavaScriptCore/runtime/JSGlobalObject.h >@@ -300,7 +300,7 @@ class JSGlobalObject : public JSSegmentedVariableObject { > WriteBarrier<JSObject> m_regExpProtoUnicodeGetter; > WriteBarrier<GetterSetter> m_throwTypeErrorArgumentsCalleeAndCallerGetterSetter; > >- WriteBarrier<JSModuleLoader> m_moduleLoader; >+ LazyProperty<JSGlobalObject, JSModuleLoader> m_moduleLoader; > > WriteBarrier<ObjectPrototype> m_objectPrototype; > WriteBarrier<FunctionPrototype> m_functionPrototype; >@@ -611,7 +611,7 @@ class JSGlobalObject : public JSSegmentedVariableObject { > return m_throwTypeErrorArgumentsCalleeAndCallerGetterSetter.get(); > } > >- JSModuleLoader* moduleLoader() const { return m_moduleLoader.get(); } >+ JSModuleLoader* moduleLoader() const { return m_moduleLoader.get(this); } > > ObjectPrototype* objectPrototype() const { return m_objectPrototype.get(); } > FunctionPrototype* functionPrototype() const { return m_functionPrototype.get(); }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193646
:
359672
|
359673
|
359709