Modified: trunk/Source/_javascript_Core/ChangeLog (173635 => 173636)
--- trunk/Source/_javascript_Core/ChangeLog 2014-09-15 22:52:47 UTC (rev 173635)
+++ trunk/Source/_javascript_Core/ChangeLog 2014-09-15 22:58:54 UTC (rev 173636)
@@ -1,3 +1,17 @@
+2014-09-15 Michael Saboff <msab...@apple.com>
+
+ Create a JSCallee for GlobalExec object
+ https://bugs.webkit.org/show_bug.cgi?id=136840
+
+ Reviewed by Geoffrey Garen.
+
+ Added m_globalCallee, initialized it and then used it to set the globalExec's callee.
+
+ * runtime/JSGlobalObject.cpp:
+ (JSC::JSGlobalObject::init):
+ (JSC::JSGlobalObject::visitChildren):
+ * runtime/JSGlobalObject.h:
+
2014-09-14 Filip Pizlo <fpi...@apple.com>
DFG ref count calculation should be reusable
Modified: trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp (173635 => 173636)
--- trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp 2014-09-15 22:52:47 UTC (rev 173635)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp 2014-09-15 22:58:54 UTC (rev 173636)
@@ -220,6 +220,11 @@
m_functionPrototype.set(vm, this, FunctionPrototype::create(vm, FunctionPrototype::createStructure(vm, this, jsNull()))); // The real prototype will be set once ObjectPrototype is created.
m_calleeStructure.set(vm, this, JSCallee::createStructure(vm, this, jsNull()));
+
+ // Need to create the callee structure (above) before creating the callee.
+ m_globalCallee.set(vm, this, JSCallee::create(vm, this, this));
+ exec->setCallee(m_globalCallee.get());
+
m_functionStructure.set(vm, this, JSFunction::createStructure(vm, this, m_functionPrototype.get()));
m_boundFunctionStructure.set(vm, this, JSBoundFunction::createStructure(vm, this, m_functionPrototype.get()));
m_namedFunctionStructure.set(vm, this, Structure::addPropertyTransition(vm, m_functionStructure.get(), vm.propertyNames->name, DontDelete | ReadOnly | DontEnum, m_functionNameOffset));
@@ -634,6 +639,7 @@
visitor.append(&thisObject->m_globalThis);
+ visitor.append(&thisObject->m_globalCallee);
visitor.append(&thisObject->m_regExpConstructor);
visitor.append(&thisObject->m_errorConstructor);
visitor.append(&thisObject->m_evalErrorConstructor);
Modified: trunk/Source/_javascript_Core/runtime/JSGlobalObject.h (173635 => 173636)
--- trunk/Source/_javascript_Core/runtime/JSGlobalObject.h 2014-09-15 22:52:47 UTC (rev 173635)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalObject.h 2014-09-15 22:58:54 UTC (rev 173636)
@@ -160,6 +160,7 @@
WriteBarrier<JSObject> m_globalThis;
+ WriteBarrier<JSObject> m_globalCallee;
WriteBarrier<RegExpConstructor> m_regExpConstructor;
WriteBarrier<ErrorConstructor> m_errorConstructor;
WriteBarrier<NativeErrorConstructor> m_evalErrorConstructor;