Ignore:
Timestamp:
Feb 17, 2016, 11:04:11 AM (9 years ago)
Author:
[email protected]
Message:

JSDOMWindow::put should not do the same thing twice
https://bugs.webkit.org/show_bug.cgi?id=154334

Reviewed by Chris Dumez.

It either calls JSGlobalObject::put or Base::put. Hint: these are basically the same thing.
In the latter case it might call lookupPut. That's redundant; JSObject::put handles static
table entries.

Source/JavaScriptCore:

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::hasOwnPropertyForWrite): Deleted.

  • no longer needed.

Source/WebCore:

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::JSDOMWindow::put):

  • just call Base::put.

(WebCore::JSDOMWindow::putByIndex):

  • just call Base::putByIndex.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h

    r196165 r196702  
    397397
    398398    JS_EXPORT_PRIVATE static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    399     bool hasOwnPropertyForWrite(ExecState*, PropertyName);
    400399    JS_EXPORT_PRIVATE static void put(JSCell*, ExecState*, PropertyName, JSValue, PutPropertySlot&);
    401400
     
    718717}
    719718
    720 inline bool JSGlobalObject::hasOwnPropertyForWrite(ExecState* exec, PropertyName propertyName)
    721 {
    722     PropertySlot slot(this);
    723     if (Base::getOwnPropertySlot(this, exec, propertyName, slot))
    724         return true;
    725     bool slotIsWriteable;
    726     return symbolTableGet(this, propertyName, slot, slotIsWriteable);
    727 }
    728 
    729719inline JSArray* constructEmptyArray(ExecState* exec, ArrayAllocationProfile* profile, JSGlobalObject* globalObject, unsigned initialLength = 0, JSValue newTarget = JSValue())
    730720{
Note: See TracChangeset for help on using the changeset viewer.