Title: [200452] trunk/Source/_javascript_Core
Revision
200452
Author
[email protected]
Date
2016-05-05 00:54:14 -0700 (Thu, 05 May 2016)

Log Message

Create console object lazily
https://bugs.webkit.org/show_bug.cgi?id=157328

Patch by Joseph Pecoraro <[email protected]> on 2016-05-05
Reviewed by Geoffrey Garen.

* runtime/CommonIdentifiers.h:
* runtime/JSGlobalObject.cpp:
(JSC::createConsoleProperty):
(JSC::JSGlobalObject::init): Deleted.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (200451 => 200452)


--- trunk/Source/_javascript_Core/ChangeLog	2016-05-05 06:42:32 UTC (rev 200451)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-05-05 07:54:14 UTC (rev 200452)
@@ -1,3 +1,15 @@
+2016-05-05  Joseph Pecoraro  <[email protected]>
+
+        Create console object lazily
+        https://bugs.webkit.org/show_bug.cgi?id=157328
+
+        Reviewed by Geoffrey Garen.
+
+        * runtime/CommonIdentifiers.h:
+        * runtime/JSGlobalObject.cpp:
+        (JSC::createConsoleProperty):
+        (JSC::JSGlobalObject::init): Deleted.
+
 2016-05-04  Michael Saboff  <[email protected]>
 
         Enable Dwarf2 debug information in offline assembler for clang compiler

Modified: trunk/Source/_javascript_Core/runtime/CommonIdentifiers.h (200451 => 200452)


--- trunk/Source/_javascript_Core/runtime/CommonIdentifiers.h	2016-05-05 06:42:32 UTC (rev 200451)
+++ trunk/Source/_javascript_Core/runtime/CommonIdentifiers.h	2016-05-05 07:54:14 UTC (rev 200452)
@@ -129,7 +129,6 @@
     macro(compilations) \
     macro(compile) \
     macro(configurable) \
-    macro(console) \
     macro(constructor) \
     macro(count) \
     macro(counters) \

Modified: trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp (200451 => 200452)


--- trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp	2016-05-05 06:42:32 UTC (rev 200451)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp	2016-05-05 07:54:14 UTC (rev 200452)
@@ -194,6 +194,12 @@
     return MathObject::create(vm, global, MathObject::createStructure(vm, global, global->objectPrototype()));
 }
 
+static JSValue createConsoleProperty(VM& vm, JSObject* object)
+{
+    JSGlobalObject* global = jsCast<JSGlobalObject*>(object);
+    return ConsoleObject::create(vm, global, ConsoleObject::createStructure(vm, global, global->objectPrototype()));
+}
+
 } // namespace JSC
 
 #include "JSGlobalObject.lut.h"
@@ -222,6 +228,7 @@
   Proxy                 createProxyProperty                          DontEnum|PropertyCallback
   JSON                  createJSONProperty                           DontEnum|PropertyCallback
   Math                  createMathProperty                           DontEnum|PropertyCallback
+  console               createConsoleProperty                        DontEnum|PropertyCallback
   Int8Array             JSGlobalObject::m_typedArrayInt8             DontEnum|ClassStructure
   Int16Array            JSGlobalObject::m_typedArrayInt16            DontEnum|ClassStructure
   Int32Array            JSGlobalObject::m_typedArrayInt32            DontEnum|ClassStructure
@@ -635,8 +642,6 @@
     ReflectObject* reflectObject = ReflectObject::create(vm, this, ReflectObject::createStructure(vm, this, m_objectPrototype.get()));
     putDirectWithoutTransition(vm, vm.propertyNames->Reflect, reflectObject, DontEnum);
 
-    putDirectWithoutTransition(vm, vm.propertyNames->console, ConsoleObject::create(vm, this, ConsoleObject::createStructure(vm, this, m_objectPrototype.get())), DontEnum);
-
     m_moduleLoader.set(vm, this, ModuleLoaderObject::create(vm, this, ModuleLoaderObject::createStructure(vm, this, m_objectPrototype.get())));
     if (Options::exposeInternalModuleLoader())
         putDirectWithoutTransition(vm, vm.propertyNames->Loader, m_moduleLoader.get(), DontEnum);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to