Changeset 200452 in webkit


Ignore:
Timestamp:
May 5, 2016, 12:54:14 AM (9 years ago)
Author:
commit-queue@webkit.org
Message:

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

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-05-05
Reviewed by Geoffrey Garen.

  • runtime/CommonIdentifiers.h:
  • runtime/JSGlobalObject.cpp:

(JSC::createConsoleProperty):
(JSC::JSGlobalObject::init): Deleted.

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r200447 r200452  
     12016-05-05  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Create console object lazily
     4        https://bugs.webkit.org/show_bug.cgi?id=157328
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * runtime/CommonIdentifiers.h:
     9        * runtime/JSGlobalObject.cpp:
     10        (JSC::createConsoleProperty):
     11        (JSC::JSGlobalObject::init): Deleted.
     12
    1132016-05-04  Michael Saboff  <msaboff@apple.com>
    214
  • trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h

    r200426 r200452  
    130130    macro(compile) \
    131131    macro(configurable) \
    132     macro(console) \
    133132    macro(constructor) \
    134133    macro(count) \
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp

    r200430 r200452  
    195195}
    196196
     197static JSValue createConsoleProperty(VM& vm, JSObject* object)
     198{
     199    JSGlobalObject* global = jsCast<JSGlobalObject*>(object);
     200    return ConsoleObject::create(vm, global, ConsoleObject::createStructure(vm, global, global->objectPrototype()));
     201}
     202
    197203} // namespace JSC
    198204
     
    223229  JSON                  createJSONProperty                           DontEnum|PropertyCallback
    224230  Math                  createMathProperty                           DontEnum|PropertyCallback
     231  console               createConsoleProperty                        DontEnum|PropertyCallback
    225232  Int8Array             JSGlobalObject::m_typedArrayInt8             DontEnum|ClassStructure
    226233  Int16Array            JSGlobalObject::m_typedArrayInt16            DontEnum|ClassStructure
     
    635642    ReflectObject* reflectObject = ReflectObject::create(vm, this, ReflectObject::createStructure(vm, this, m_objectPrototype.get()));
    636643    putDirectWithoutTransition(vm, vm.propertyNames->Reflect, reflectObject, DontEnum);
    637 
    638     putDirectWithoutTransition(vm, vm.propertyNames->console, ConsoleObject::create(vm, this, ConsoleObject::createStructure(vm, this, m_objectPrototype.get())), DontEnum);
    639644
    640645    m_moduleLoader.set(vm, this, ModuleLoaderObject::create(vm, this, ModuleLoaderObject::createStructure(vm, this, m_objectPrototype.get())));
Note: See TracChangeset for help on using the changeset viewer.