Unreviewed, rolling out r160133.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Dec 2013 01:19:42 +0000 (01:19 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Dec 2013 01:19:42 +0000 (01:19 +0000)
http://trac.webkit.org/changeset/160133
https://bugs.webkit.org/show_bug.cgi?id=125325

broke bindings tests on all the bots (Requested by thorton on
#webkit).

Source/JavaScriptCore:

* API/JSCallbackObject.h:
* API/JSCallbackObjectFunctions.h:
(JSC::::staticFunctionGetter):
(JSC::::callbackGetter):
* jit/JITOperations.cpp:
* runtime/JSActivation.cpp:
(JSC::JSActivation::argumentsGetter):
* runtime/JSActivation.h:
* runtime/JSFunction.cpp:
(JSC::JSFunction::argumentsGetter):
(JSC::JSFunction::callerGetter):
(JSC::JSFunction::lengthGetter):
(JSC::JSFunction::nameGetter):
* runtime/JSFunction.h:
* runtime/JSObject.h:
(JSC::PropertySlot::getValue):
* runtime/NumberConstructor.cpp:
(JSC::numberConstructorNaNValue):
(JSC::numberConstructorNegInfinity):
(JSC::numberConstructorPosInfinity):
(JSC::numberConstructorMaxValue):
(JSC::numberConstructorMinValue):
* runtime/PropertySlot.h:
* runtime/RegExpConstructor.cpp:
(JSC::regExpConstructorDollar1):
(JSC::regExpConstructorDollar2):
(JSC::regExpConstructorDollar3):
(JSC::regExpConstructorDollar4):
(JSC::regExpConstructorDollar5):
(JSC::regExpConstructorDollar6):
(JSC::regExpConstructorDollar7):
(JSC::regExpConstructorDollar8):
(JSC::regExpConstructorDollar9):
(JSC::regExpConstructorInput):
(JSC::regExpConstructorMultiline):
(JSC::regExpConstructorLastMatch):
(JSC::regExpConstructorLastParen):
(JSC::regExpConstructorLeftContext):
(JSC::regExpConstructorRightContext):
* runtime/RegExpObject.cpp:
(JSC::regExpObjectGlobal):
(JSC::regExpObjectIgnoreCase):
(JSC::regExpObjectMultiline):
(JSC::regExpObjectSource):

Source/WebCore:

* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::cssPropertyGetterPixelOrPosPrefixCallback):
(WebCore::cssPropertyGetterCallback):
* bindings/js/JSDOMBinding.cpp:
(WebCore::objectToStringFunctionGetter):
* bindings/js/JSDOMBinding.h:
* bindings/js/JSDOMMimeTypeArrayCustom.cpp:
(WebCore::JSDOMMimeTypeArray::nameGetter):
* bindings/js/JSDOMPluginArrayCustom.cpp:
(WebCore::JSDOMPluginArray::nameGetter):
* bindings/js/JSDOMPluginCustom.cpp:
(WebCore::JSDOMPlugin::nameGetter):
* bindings/js/JSDOMStringMapCustom.cpp:
(WebCore::JSDOMStringMap::nameGetter):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::nonCachingStaticFunctionGetter):
(WebCore::childFrameGetter):
(WebCore::indexGetter):
(WebCore::namedItemGetter):
* bindings/js/JSHTMLAllCollectionCustom.cpp:
(WebCore::JSHTMLAllCollection::nameGetter):
* bindings/js/JSHTMLCollectionCustom.cpp:
(WebCore::JSHTMLCollection::nameGetter):
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::nameGetter):
* bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
(WebCore::JSHTMLFormControlsCollection::nameGetter):
* bindings/js/JSHTMLFormElementCustom.cpp:
(WebCore::JSHTMLFormElement::nameGetter):
* bindings/js/JSHTMLFrameSetElementCustom.cpp:
(WebCore::JSHTMLFrameSetElement::nameGetter):
* bindings/js/JSHistoryCustom.cpp:
(WebCore::nonCachingStaticBackFunctionGetter):
(WebCore::nonCachingStaticForwardFunctionGetter):
(WebCore::nonCachingStaticGoFunctionGetter):
* bindings/js/JSJavaScriptCallFrameCustom.cpp:
(WebCore::JSJavaScriptCallFrame::scopeType):
* bindings/js/JSLocationCustom.cpp:
(WebCore::nonCachingStaticReplaceFunctionGetter):
(WebCore::nonCachingStaticReloadFunctionGetter):
(WebCore::nonCachingStaticAssignFunctionGetter):
* bindings/js/JSNamedNodeMapCustom.cpp:
(WebCore::JSNamedNodeMap::nameGetter):
* bindings/js/JSNodeListCustom.cpp:
(WebCore::JSNodeList::nameGetter):
* bindings/js/JSPluginElementFunctions.cpp:
(WebCore::pluginElementPropertyGetter):
* bindings/js/JSPluginElementFunctions.h:
* bindings/js/JSRTCStatsResponseCustom.cpp:
(WebCore::JSRTCStatsResponse::nameGetter):
* bindings/js/JSStorageCustom.cpp:
(WebCore::JSStorage::nameGetter):
* bindings/js/JSStyleSheetListCustom.cpp:
(WebCore::JSStyleSheetList::nameGetter):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(GenerateParametersCheck):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::lengthGetter):
(JSC::RuntimeArray::indexGetter):
* bridge/runtime_array.h:
* bridge/runtime_method.cpp:
(JSC::RuntimeMethod::lengthGetter):
* bridge/runtime_method.h:
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::fallbackObjectGetter):
(JSC::Bindings::RuntimeObject::fieldGetter):
(JSC::Bindings::RuntimeObject::methodGetter):
* bridge/runtime_object.h:

Source/WebKit2:

* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
(WebKit::callMethod):
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::callNPJSObject):
(WebKit::constructWithConstructor):
(WebKit::JSNPObject::propertyGetter):
(WebKit::JSNPObject::methodGetter):
* WebProcess/Plugins/Netscape/JSNPObject.h:
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::getOrCreateNPObject):
(WebKit::NPRuntimeObjectMap::finalize):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::counterValue):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@160204 268f45cc-cd09-0410-ab3c-d52691b4dbfc

51 files changed:
Source/JavaScriptCore/API/JSCallbackObject.h
Source/JavaScriptCore/API/JSCallbackObjectFunctions.h
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/jit/JITOperations.cpp
Source/JavaScriptCore/runtime/JSActivation.cpp
Source/JavaScriptCore/runtime/JSActivation.h
Source/JavaScriptCore/runtime/JSFunction.cpp
Source/JavaScriptCore/runtime/JSFunction.h
Source/JavaScriptCore/runtime/JSObject.h
Source/JavaScriptCore/runtime/NumberConstructor.cpp
Source/JavaScriptCore/runtime/PropertySlot.h
Source/JavaScriptCore/runtime/RegExpConstructor.cpp
Source/JavaScriptCore/runtime/RegExpObject.cpp
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp
Source/WebCore/bindings/js/JSDOMBinding.cpp
Source/WebCore/bindings/js/JSDOMBinding.h
Source/WebCore/bindings/js/JSDOMMimeTypeArrayCustom.cpp
Source/WebCore/bindings/js/JSDOMPluginArrayCustom.cpp
Source/WebCore/bindings/js/JSDOMPluginCustom.cpp
Source/WebCore/bindings/js/JSDOMStringMapCustom.cpp
Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
Source/WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp
Source/WebCore/bindings/js/JSHTMLCollectionCustom.cpp
Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp
Source/WebCore/bindings/js/JSHTMLFormControlsCollectionCustom.cpp
Source/WebCore/bindings/js/JSHTMLFormElementCustom.cpp
Source/WebCore/bindings/js/JSHTMLFrameSetElementCustom.cpp
Source/WebCore/bindings/js/JSHistoryCustom.cpp
Source/WebCore/bindings/js/JSJavaScriptCallFrameCustom.cpp
Source/WebCore/bindings/js/JSLocationCustom.cpp
Source/WebCore/bindings/js/JSNamedNodeMapCustom.cpp
Source/WebCore/bindings/js/JSNodeListCustom.cpp
Source/WebCore/bindings/js/JSPluginElementFunctions.cpp
Source/WebCore/bindings/js/JSPluginElementFunctions.h
Source/WebCore/bindings/js/JSRTCStatsResponseCustom.cpp
Source/WebCore/bindings/js/JSStorageCustom.cpp
Source/WebCore/bindings/js/JSStyleSheetListCustom.cpp
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bridge/runtime_array.cpp
Source/WebCore/bridge/runtime_array.h
Source/WebCore/bridge/runtime_method.cpp
Source/WebCore/bridge/runtime_method.h
Source/WebCore/bridge/runtime_object.cpp
Source/WebCore/bridge/runtime_object.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Plugins/Netscape/JSNPMethod.cpp
Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.cpp
Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.h
Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp
Source/WebKit2/WebProcess/WebPage/WebFrame.cpp

index 7ad1608..510164d 100644 (file)
@@ -205,14 +205,13 @@ private:
     void init(ExecState*);
  
     static JSCallbackObject* asCallbackObject(JSValue);
-    static JSCallbackObject* asCallbackObject(EncodedJSValue);
  
     static EncodedJSValue JSC_HOST_CALL call(ExecState*);
     static EncodedJSValue JSC_HOST_CALL construct(ExecState*);
    
     JSValue getStaticValue(ExecState*, PropertyName);
-    static EncodedJSValue staticFunctionGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-    static EncodedJSValue callbackGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
+    static JSValue staticFunctionGetter(ExecState*, JSValue, PropertyName);
+    static JSValue callbackGetter(ExecState*, JSValue, PropertyName);
 
     OwnPtr<JSCallbackObjectData> m_callbackObjectData;
 };
index 5be053f..83992d3 100644 (file)
@@ -50,13 +50,6 @@ inline JSCallbackObject<Parent>* JSCallbackObject<Parent>::asCallbackObject(JSVa
 }
 
 template <class Parent>
-inline JSCallbackObject<Parent>* JSCallbackObject<Parent>::asCallbackObject(EncodedJSValue value)
-{
-    ASSERT(asObject(JSValue::decode(value))->inherits(info()));
-    return jsCast<JSCallbackObject*>(asObject(JSValue::decode(value)));
-}
-
-template <class Parent>
 JSCallbackObject<Parent>::JSCallbackObject(ExecState* exec, Structure* structure, JSClassRef jsClass, void* data)
     : Parent(exec->vm(), structure)
     , m_callbackObjectData(adoptPtr(new JSCallbackObjectData(data, jsClass)))
@@ -591,14 +584,14 @@ JSValue JSCallbackObject<Parent>::getStaticValue(ExecState* exec, PropertyName p
 }
 
 template <class Parent>
-EncodedJSValue JSCallbackObject<Parent>::staticFunctionGetter(ExecState* exec, EncodedJSValue slotParent, EncodedJSValue, PropertyName propertyName)
+JSValue JSCallbackObject<Parent>::staticFunctionGetter(ExecState* exec, JSValue slotParent, PropertyName propertyName)
 {
     JSCallbackObject* thisObj = asCallbackObject(slotParent);
     
     // Check for cached or override property.
     PropertySlot slot2(thisObj);
     if (Parent::getOwnPropertySlot(thisObj, exec, propertyName, slot2))
-        return JSValue::encode(slot2.getValue(exec, propertyName));
+        return slot2.getValue(exec, propertyName);
 
     if (StringImpl* name = propertyName.publicName()) {
         for (JSClassRef jsClass = thisObj->classRef(); jsClass; jsClass = jsClass->parentClass) {
@@ -608,18 +601,18 @@ EncodedJSValue JSCallbackObject<Parent>::staticFunctionGetter(ExecState* exec, E
                         VM& vm = exec->vm();
                         JSObject* o = JSCallbackFunction::create(vm, thisObj->globalObject(), callAsFunction, name);
                         thisObj->putDirect(vm, propertyName, o, entry->attributes);
-                        return JSValue::encode(o);
+                        return o;
                     }
                 }
             }
         }
     }
 
-    return JSValue::encode(exec->vm().throwException(exec, createReferenceError(exec, ASCIILiteral("Static function property defined with NULL callAsFunction callback."))));
+    return exec->vm().throwException(exec, createReferenceError(exec, ASCIILiteral("Static function property defined with NULL callAsFunction callback.")));
 }
 
 template <class Parent>
-EncodedJSValue JSCallbackObject<Parent>::callbackGetter(ExecState* exec, EncodedJSValue slotParent, EncodedJSValue, PropertyName propertyName)
+JSValue JSCallbackObject<Parent>::callbackGetter(ExecState* exec, JSValue slotParent, PropertyName propertyName)
 {
     JSCallbackObject* thisObj = asCallbackObject(slotParent);
     
@@ -639,15 +632,15 @@ EncodedJSValue JSCallbackObject<Parent>::callbackGetter(ExecState* exec, Encoded
                 }
                 if (exception) {
                     exec->vm().throwException(exec, toJS(exec, exception));
-                    return JSValue::encode(jsUndefined());
+                    return jsUndefined();
                 }
                 if (value)
-                    return JSValue::encode(toJS(exec, value));
+                    return toJS(exec, value);
             }
         }
     }
 
-    return JSValue::encode(exec->vm().throwException(exec, createReferenceError(exec, ASCIILiteral("hasProperty callback returned true for a property that doesn't exist."))));
+    return exec->vm().throwException(exec, createReferenceError(exec, ASCIILiteral("hasProperty callback returned true for a property that doesn't exist.")));
 }
 
 } // namespace JSC
index a3efa91..c93670c 100644 (file)
@@ -1,3 +1,57 @@
+2013-12-05  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r160133.
+        http://trac.webkit.org/changeset/160133
+        https://bugs.webkit.org/show_bug.cgi?id=125325
+
+        broke bindings tests on all the bots (Requested by thorton on
+        #webkit).
+
+        * API/JSCallbackObject.h:
+        * API/JSCallbackObjectFunctions.h:
+        (JSC::::staticFunctionGetter):
+        (JSC::::callbackGetter):
+        * jit/JITOperations.cpp:
+        * runtime/JSActivation.cpp:
+        (JSC::JSActivation::argumentsGetter):
+        * runtime/JSActivation.h:
+        * runtime/JSFunction.cpp:
+        (JSC::JSFunction::argumentsGetter):
+        (JSC::JSFunction::callerGetter):
+        (JSC::JSFunction::lengthGetter):
+        (JSC::JSFunction::nameGetter):
+        * runtime/JSFunction.h:
+        * runtime/JSObject.h:
+        (JSC::PropertySlot::getValue):
+        * runtime/NumberConstructor.cpp:
+        (JSC::numberConstructorNaNValue):
+        (JSC::numberConstructorNegInfinity):
+        (JSC::numberConstructorPosInfinity):
+        (JSC::numberConstructorMaxValue):
+        (JSC::numberConstructorMinValue):
+        * runtime/PropertySlot.h:
+        * runtime/RegExpConstructor.cpp:
+        (JSC::regExpConstructorDollar1):
+        (JSC::regExpConstructorDollar2):
+        (JSC::regExpConstructorDollar3):
+        (JSC::regExpConstructorDollar4):
+        (JSC::regExpConstructorDollar5):
+        (JSC::regExpConstructorDollar6):
+        (JSC::regExpConstructorDollar7):
+        (JSC::regExpConstructorDollar8):
+        (JSC::regExpConstructorDollar9):
+        (JSC::regExpConstructorInput):
+        (JSC::regExpConstructorMultiline):
+        (JSC::regExpConstructorLastMatch):
+        (JSC::regExpConstructorLastParen):
+        (JSC::regExpConstructorLeftContext):
+        (JSC::regExpConstructorRightContext):
+        * runtime/RegExpObject.cpp:
+        (JSC::regExpObjectGlobal):
+        (JSC::regExpObjectIgnoreCase):
+        (JSC::regExpObjectMultiline):
+        (JSC::regExpObjectSource):
+
 2013-12-05  Mark Lam  <mark.lam@apple.com>
 
         Make the C Loop LLINT work with callToJavaScript.
index dc0ce5d..914fead 100644 (file)
@@ -222,7 +222,7 @@ EncodedJSValue JIT_OPERATION operationCallCustomGetter(ExecState* exec, JSCell*
     
     Identifier ident(vm, uid);
     
-    return function(exec, JSValue::encode(base), JSValue::encode(base), ident);
+    return JSValue::encode(function(exec, asObject(base), ident));
 }
 
 EncodedJSValue JIT_OPERATION operationCallGetter(ExecState* exec, JSCell* base, JSCell* getterSetter)
index 72ed1c7..a839c94 100644 (file)
@@ -210,17 +210,17 @@ JSValue JSActivation::toThis(JSCell*, ExecState* exec, ECMAMode ecmaMode)
     return exec->globalThisValue();
 }
 
-EncodedJSValue JSActivation::argumentsGetter(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
+JSValue JSActivation::argumentsGetter(ExecState*, JSValue slotBase, PropertyName)
 {
-    JSActivation* activation = jsCast<JSActivation*>(JSValue::decode(slotBase));
+    JSActivation* activation = jsCast<JSActivation*>(slotBase);
     CallFrame* callFrame = CallFrame::create(reinterpret_cast<Register*>(activation->m_registers));
     ASSERT(!activation->isTornOff() && (callFrame->codeBlock()->usesArguments() || callFrame->codeBlock()->usesEval()));
     if (activation->isTornOff() || !(callFrame->codeBlock()->usesArguments() || callFrame->codeBlock()->usesEval()))
-        return JSValue::encode(jsUndefined());
+        return jsUndefined();
 
     VirtualRegister argumentsRegister = callFrame->codeBlock()->argumentsRegister();
     if (JSValue arguments = callFrame->uncheckedR(argumentsRegister.offset()).jsValue())
-        return JSValue::encode(arguments);
+        return arguments;
     int realArgumentsRegister = unmodifiedArgumentsRegister(argumentsRegister).offset();
 
     JSValue arguments = JSValue(Arguments::create(callFrame->vm(), callFrame));
@@ -228,7 +228,7 @@ EncodedJSValue JSActivation::argumentsGetter(ExecState*, EncodedJSValue slotBase
     callFrame->uncheckedR(realArgumentsRegister) = arguments;
     
     ASSERT(callFrame->uncheckedR(realArgumentsRegister).jsValue().inherits(Arguments::info()));
-    return JSValue::encode(callFrame->uncheckedR(realArgumentsRegister).jsValue());
+    return callFrame->uncheckedR(realArgumentsRegister).jsValue();
 }
 
 } // namespace JSC
index 67eafee..96bfd7f 100644 (file)
@@ -100,7 +100,7 @@ private:
     bool symbolTablePut(ExecState*, PropertyName, JSValue, bool shouldThrow);
     bool symbolTablePutWithAttributes(VM&, PropertyName, JSValue, unsigned attributes);
 
-    static EncodedJSValue argumentsGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
+    static JSValue argumentsGetter(ExecState*, JSValue, PropertyName);
 
     static size_t allocationSize(SymbolTable*);
     static size_t storageOffset();
index 0c75480..88f1979 100644 (file)
@@ -212,12 +212,12 @@ static JSValue retrieveArguments(ExecState* exec, JSFunction* functionObj)
     return functor.result();
 }
 
-EncodedJSValue JSFunction::argumentsGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
+JSValue JSFunction::argumentsGetter(ExecState* exec, JSValue slotBase, PropertyName)
 {
-    JSFunction* thisObj = jsCast<JSFunction*>(JSValue::decode(slotBase));
+    JSFunction* thisObj = jsCast<JSFunction*>(slotBase);
     ASSERT(!thisObj->isHostFunction());
 
-    return JSValue::encode(retrieveArguments(exec, thisObj));
+    return retrieveArguments(exec, thisObj);
 }
 
 class RetrieveCallerFunctionFunctor {
@@ -267,33 +267,33 @@ static JSValue retrieveCallerFunction(ExecState* exec, JSFunction* functionObj)
     return functor.result();
 }
 
-EncodedJSValue JSFunction::callerGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
+JSValue JSFunction::callerGetter(ExecState* exec, JSValue slotBase, PropertyName)
 {
-    JSFunction* thisObj = jsCast<JSFunction*>(JSValue::decode(slotBase));
+    JSFunction* thisObj = jsCast<JSFunction*>(slotBase);
     ASSERT(!thisObj->isHostFunction());
     JSValue caller = retrieveCallerFunction(exec, thisObj);
 
     // See ES5.1 15.3.5.4 - Function.caller may not be used to retrieve a strict caller.
     if (!caller.isObject() || !asObject(caller)->inherits(JSFunction::info()))
-        return JSValue::encode(caller);
+        return caller;
     JSFunction* function = jsCast<JSFunction*>(caller);
     if (function->isHostFunction() || !function->jsExecutable()->isStrictMode())
-        return JSValue::encode(caller);
-    return JSValue::encode(throwTypeError(exec, ASCIILiteral("Function.caller used to retrieve strict caller")));
+        return caller;
+    return throwTypeError(exec, ASCIILiteral("Function.caller used to retrieve strict caller"));
 }
 
-EncodedJSValue JSFunction::lengthGetter(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
+JSValue JSFunction::lengthGetter(ExecState*, JSValue slotBase, PropertyName)
 {
-    JSFunction* thisObj = jsCast<JSFunction*>(JSValue::decode(slotBase));
+    JSFunction* thisObj = jsCast<JSFunction*>(slotBase);
     ASSERT(!thisObj->isHostFunction());
-    return JSValue::encode(jsNumber(thisObj->jsExecutable()->parameterCount()));
+    return jsNumber(thisObj->jsExecutable()->parameterCount());
 }
 
-EncodedJSValue JSFunction::nameGetter(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
+JSValue JSFunction::nameGetter(ExecState*, JSValue slotBase, PropertyName)
 {
-    JSFunction* thisObj = jsCast<JSFunction*>(JSValue::decode(slotBase));
+    JSFunction* thisObj = jsCast<JSFunction*>(slotBase);
     ASSERT(!thisObj->isHostFunction());
-    return JSValue::encode(thisObj->jsExecutable()->nameValue());
+    return thisObj->jsExecutable()->nameValue();
 }
 
 bool JSFunction::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
index 7cd14b8..ced623b 100644 (file)
@@ -171,10 +171,10 @@ namespace JSC {
         
         JS_EXPORT_PRIVATE bool isHostFunctionNonInline() const;
 
-        static EncodedJSValue argumentsGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-        static EncodedJSValue callerGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-        static EncodedJSValue lengthGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-        static EncodedJSValue nameGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
+        static JSValue argumentsGetter(ExecState*, JSValue, PropertyName);
+        static JSValue callerGetter(ExecState*, JSValue, PropertyName);
+        static JSValue lengthGetter(ExecState*, JSValue, PropertyName);
+        static JSValue nameGetter(ExecState*, JSValue, PropertyName);
 
         WriteBarrier<ExecutableBase> m_executable;
         WriteBarrier<JSScope> m_scope;
index cf57ebd..60ae168 100644 (file)
@@ -1535,10 +1535,10 @@ ALWAYS_INLINE JSValue PropertySlot::getValue(ExecState* exec, PropertyName prope
     if (m_propertyType == TypeValue)
         return JSValue::decode(m_data.value);
     if (m_propertyType == TypeCustomIndex)
-        return JSValue::decode(m_data.customIndex.getIndexValue(exec, JSValue::encode(slotBase()), JSValue::encode(m_thisValue), m_data.customIndex.index));
+        return m_data.customIndex.getIndexValue(exec, slotBase(), m_data.customIndex.index);
     if (m_propertyType == TypeGetter)
         return functionGetter(exec);
-    return JSValue::decode(m_data.custom.getValue(exec, JSValue::encode(slotBase()), JSValue::encode(m_thisValue), propertyName));
+    return m_data.custom.getValue(exec, slotBase(), propertyName);
 }
 
 ALWAYS_INLINE JSValue PropertySlot::getValue(ExecState* exec, unsigned propertyName) const
@@ -1546,10 +1546,10 @@ ALWAYS_INLINE JSValue PropertySlot::getValue(ExecState* exec, unsigned propertyN
     if (m_propertyType == TypeValue)
         return JSValue::decode(m_data.value);
     if (m_propertyType == TypeCustomIndex)
-        return JSValue::decode(m_data.customIndex.getIndexValue(exec, JSValue::encode(slotBase()), JSValue::encode(m_thisValue), m_data.customIndex.index));
+        return m_data.customIndex.getIndexValue(exec, slotBase(), m_data.customIndex.index);
     if (m_propertyType == TypeGetter)
         return functionGetter(exec);
-    return JSValue::decode(m_data.custom.getValue(exec, JSValue::encode(slotBase()), JSValue::encode(m_thisValue), Identifier::from(exec, propertyName)));
+    return m_data.custom.getValue(exec, slotBase(), Identifier::from(exec, propertyName));
 }
 
 } // namespace JSC
index 17963a1..12fc14d 100644 (file)
 
 namespace JSC {
 
-static EncodedJSValue numberConstructorNaNValue(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-static EncodedJSValue numberConstructorNegInfinity(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-static EncodedJSValue numberConstructorPosInfinity(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-static EncodedJSValue numberConstructorMaxValue(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-static EncodedJSValue numberConstructorMinValue(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
+static JSValue numberConstructorNaNValue(ExecState*, JSValue, PropertyName);
+static JSValue numberConstructorNegInfinity(ExecState*, JSValue, PropertyName);
+static JSValue numberConstructorPosInfinity(ExecState*, JSValue, PropertyName);
+static JSValue numberConstructorMaxValue(ExecState*, JSValue, PropertyName);
+static JSValue numberConstructorMinValue(ExecState*, JSValue, PropertyName);
 
 } // namespace JSC
 
@@ -82,29 +82,29 @@ void NumberConstructor::put(JSCell* cell, ExecState* exec, PropertyName property
     lookupPut<NumberConstructor, InternalFunction>(exec, propertyName, value, ExecState::numberConstructorTable(exec), jsCast<NumberConstructor*>(cell), slot);
 }
 
-static EncodedJSValue numberConstructorNaNValue(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName)
+static JSValue numberConstructorNaNValue(ExecState*, JSValue, PropertyName)
 {
-    return JSValue::encode(jsNaN());
+    return jsNaN();
 }
 
-static EncodedJSValue numberConstructorNegInfinity(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName)
+static JSValue numberConstructorNegInfinity(ExecState*, JSValue, PropertyName)
 {
-    return JSValue::encode(jsNumber(-std::numeric_limits<double>::infinity()));
+    return jsNumber(-std::numeric_limits<double>::infinity());
 }
 
-static EncodedJSValue numberConstructorPosInfinity(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName)
+static JSValue numberConstructorPosInfinity(ExecState*, JSValue, PropertyName)
 {
-    return JSValue::encode(jsNumber(std::numeric_limits<double>::infinity()));
+    return jsNumber(std::numeric_limits<double>::infinity());
 }
 
-static EncodedJSValue numberConstructorMaxValue(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName)
+static JSValue numberConstructorMaxValue(ExecState*, JSValue, PropertyName)
 {
-    return JSValue::encode(jsNumber(1.7976931348623157E+308));
+    return jsNumber(1.7976931348623157E+308);
 }
 
-static EncodedJSValue numberConstructorMinValue(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName)
+static JSValue numberConstructorMinValue(ExecState*, JSValue, PropertyName)
 {
-    return JSValue::encode(jsNumber(5E-324));
+    return jsNumber(5E-324);
 }
 
 // ECMA 15.7.1
index ae93455..714577e 100644 (file)
@@ -60,8 +60,8 @@ public:
     {
     }
 
-    typedef EncodedJSValue (*GetValueFunc)(ExecState*, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName);
-    typedef EncodedJSValue (*GetIndexValueFunc)(ExecState*, EncodedJSValue slotBase, EncodedJSValue thisValue, unsigned);
+    typedef JSValue (*GetValueFunc)(ExecState*, JSValue slotBase, PropertyName);
+    typedef JSValue (*GetIndexValueFunc)(ExecState*, JSValue slotBase, unsigned);
 
     JSValue getValue(ExecState*, PropertyName) const;
     JSValue getValue(ExecState*, unsigned propertyName) const;
@@ -226,7 +226,7 @@ private:
 
     PropertyType m_propertyType;
     PropertyOffset m_offset;
-    const JSValue m_thisValue;
+    JSValue m_thisValue;
     JSObject* m_slotBase;
 };
 
index d4f5602..6756011 100644 (file)
 
 namespace JSC {
 
-static EncodedJSValue regExpConstructorInput(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-static EncodedJSValue regExpConstructorMultiline(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-static EncodedJSValue regExpConstructorLastMatch(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-static EncodedJSValue regExpConstructorLastParen(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-static EncodedJSValue regExpConstructorLeftContext(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-static EncodedJSValue regExpConstructorRightContext(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-static EncodedJSValue regExpConstructorDollar1(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-static EncodedJSValue regExpConstructorDollar2(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-static EncodedJSValue regExpConstructorDollar3(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-static EncodedJSValue regExpConstructorDollar4(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-static EncodedJSValue regExpConstructorDollar5(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-static EncodedJSValue regExpConstructorDollar6(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-static EncodedJSValue regExpConstructorDollar7(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-static EncodedJSValue regExpConstructorDollar8(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-static EncodedJSValue regExpConstructorDollar9(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
+static JSValue regExpConstructorInput(ExecState*, JSValue, PropertyName);
+static JSValue regExpConstructorMultiline(ExecState*, JSValue, PropertyName);
+static JSValue regExpConstructorLastMatch(ExecState*, JSValue, PropertyName);
+static JSValue regExpConstructorLastParen(ExecState*, JSValue, PropertyName);
+static JSValue regExpConstructorLeftContext(ExecState*, JSValue, PropertyName);
+static JSValue regExpConstructorRightContext(ExecState*, JSValue, PropertyName);
+static JSValue regExpConstructorDollar1(ExecState*, JSValue, PropertyName);
+static JSValue regExpConstructorDollar2(ExecState*, JSValue, PropertyName);
+static JSValue regExpConstructorDollar3(ExecState*, JSValue, PropertyName);
+static JSValue regExpConstructorDollar4(ExecState*, JSValue, PropertyName);
+static JSValue regExpConstructorDollar5(ExecState*, JSValue, PropertyName);
+static JSValue regExpConstructorDollar6(ExecState*, JSValue, PropertyName);
+static JSValue regExpConstructorDollar7(ExecState*, JSValue, PropertyName);
+static JSValue regExpConstructorDollar8(ExecState*, JSValue, PropertyName);
+static JSValue regExpConstructorDollar9(ExecState*, JSValue, PropertyName);
 
 static void setRegExpConstructorInput(ExecState*, JSObject*, JSValue);
 static void setRegExpConstructorMultiline(ExecState*, JSObject*, JSValue);
@@ -158,84 +158,79 @@ bool RegExpConstructor::getOwnPropertySlot(JSObject* object, ExecState* exec, Pr
     return getStaticValueSlot<RegExpConstructor, InternalFunction>(exec, ExecState::regExpConstructorTable(exec), jsCast<RegExpConstructor*>(object), propertyName, slot);
 }
 
-static inline RegExpConstructor* asRegExpConstructor(EncodedJSValue value)
+JSValue regExpConstructorDollar1(ExecState* exec, JSValue slotBase, PropertyName)
 {
-    return jsCast<RegExpConstructor*>(JSValue::decode(value));
-}
-    
-EncodedJSValue regExpConstructorDollar1(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
-{
-    return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 1));
+    return asRegExpConstructor(slotBase)->getBackref(exec, 1);
 }
 
-EncodedJSValue regExpConstructorDollar2(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
+JSValue regExpConstructorDollar2(ExecState* exec, JSValue slotBase, PropertyName)
 {
-    return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 2));
+    return asRegExpConstructor(slotBase)->getBackref(exec, 2);
 }
 
-EncodedJSValue regExpConstructorDollar3(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
+JSValue regExpConstructorDollar3(ExecState* exec, JSValue slotBase, PropertyName)
 {
-    return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 3));
+    return asRegExpConstructor(slotBase)->getBackref(exec, 3);
 }
 
-EncodedJSValue regExpConstructorDollar4(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
+JSValue regExpConstructorDollar4(ExecState* exec, JSValue slotBase, PropertyName)
 {
-    return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 4));
+    return asRegExpConstructor(slotBase)->getBackref(exec, 4);
 }
 
-EncodedJSValue regExpConstructorDollar5(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
+JSValue regExpConstructorDollar5(ExecState* exec, JSValue slotBase, PropertyName)
 {
-    return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 5));
+    return asRegExpConstructor(slotBase)->getBackref(exec, 5);
 }
 
-EncodedJSValue regExpConstructorDollar6(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
+JSValue regExpConstructorDollar6(ExecState* exec, JSValue slotBase, PropertyName)
 {
-    return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 6));
+    return asRegExpConstructor(slotBase)->getBackref(exec, 6);
 }
 
-EncodedJSValue regExpConstructorDollar7(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
+JSValue regExpConstructorDollar7(ExecState* exec, JSValue slotBase, PropertyName)
 {
-    return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 7));
+    return asRegExpConstructor(slotBase)->getBackref(exec, 7);
 }
 
-EncodedJSValue regExpConstructorDollar8(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
+JSValue regExpConstructorDollar8(ExecState* exec, JSValue slotBase, PropertyName)
 {
-    return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 8));
+    return asRegExpConstructor(slotBase)->getBackref(exec, 8);
 }
 
-EncodedJSValue regExpConstructorDollar9(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
+JSValue regExpConstructorDollar9(ExecState* exec, JSValue slotBase, PropertyName)
 {
-    return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 9));
+    return asRegExpConstructor(slotBase)->getBackref(exec, 9);
 }
 
-EncodedJSValue regExpConstructorInput(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
+JSValue regExpConstructorInput(ExecState*, JSValue slotBase, PropertyName)
 {
-    return JSValue::encode(asRegExpConstructor(slotBase)->input());
+    return asRegExpConstructor(slotBase)->input();
 }
 
-EncodedJSValue regExpConstructorMultiline(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
+JSValue regExpConstructorMultiline(ExecState*, JSValue slotBase, PropertyName)
 {
-    return JSValue::encode(jsBoolean(asRegExpConstructor(slotBase)->multiline()));
+    return jsBoolean(asRegExpConstructor(slotBase)->multiline());
 }
 
-EncodedJSValue regExpConstructorLastMatch(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
+JSValue regExpConstructorLastMatch(ExecState* exec, JSValue slotBase, PropertyName)
 {
-    return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 0));
+    return asRegExpConstructor(slotBase)->getBackref(exec, 0);
 }
 
-EncodedJSValue regExpConstructorLastParen(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
+JSValue regExpConstructorLastParen(ExecState* exec, JSValue slotBase, PropertyName)
 {
-    return JSValue::encode(asRegExpConstructor(slotBase)->getLastParen(exec));
+    return asRegExpConstructor(slotBase)->getLastParen(exec);
 }
 
-EncodedJSValue regExpConstructorLeftContext(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
+JSValue regExpConstructorLeftContext(ExecState* exec, JSValue slotBase, PropertyName)
 {
-    return JSValue::encode(asRegExpConstructor(slotBase)->getLeftContext(exec));
+    return asRegExpConstructor(slotBase)->getLeftContext(exec);
 }
 
-EncodedJSValue regExpConstructorRightContext(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
+JSValue regExpConstructorRightContext(ExecState* exec, JSValue slotBase, PropertyName)
 {
-    return JSValue::encode(asRegExpConstructor(slotBase)->getRightContext(exec));
+    return asRegExpConstructor(slotBase)->getRightContext(exec);
 }
 
 void RegExpConstructor::put(JSCell* cell, ExecState* exec, PropertyName propertyName, JSValue value, PutPropertySlot& slot)
index 009cac1..ccea708 100644 (file)
 
 namespace JSC {
 
-static EncodedJSValue regExpObjectGlobal(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-static EncodedJSValue regExpObjectIgnoreCase(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-static EncodedJSValue regExpObjectMultiline(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-static EncodedJSValue regExpObjectSource(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
+static JSValue regExpObjectGlobal(ExecState*, JSValue, PropertyName);
+static JSValue regExpObjectIgnoreCase(ExecState*, JSValue, PropertyName);
+static JSValue regExpObjectMultiline(ExecState*, JSValue, PropertyName);
+static JSValue regExpObjectSource(ExecState*, JSValue, PropertyName);
 
 } // namespace JSC
 
@@ -155,24 +155,19 @@ bool RegExpObject::defineOwnProperty(JSObject* object, ExecState* exec, Property
     return Base::defineOwnProperty(object, exec, propertyName, descriptor, shouldThrow);
 }
 
-static inline RegExpObject* asRegExpObject(EncodedJSValue value)
+JSValue regExpObjectGlobal(ExecState*, JSValue slotBase, PropertyName)
 {
-    return jsCast<RegExpObject*>(JSValue::decode(value));
+    return jsBoolean(asRegExpObject(slotBase)->regExp()->global());
 }
 
-EncodedJSValue regExpObjectGlobal(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
+JSValue regExpObjectIgnoreCase(ExecState*, JSValue slotBase, PropertyName)
 {
-    return JSValue::encode(jsBoolean(asRegExpObject(slotBase)->regExp()->global()));
-}
-
-EncodedJSValue regExpObjectIgnoreCase(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
-{
-    return JSValue::encode(jsBoolean(asRegExpObject(slotBase)->regExp()->ignoreCase()));
+    return jsBoolean(asRegExpObject(slotBase)->regExp()->ignoreCase());
 }
  
-EncodedJSValue regExpObjectMultiline(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
+JSValue regExpObjectMultiline(ExecState*, JSValue slotBase, PropertyName)
 {            
-    return JSValue::encode(jsBoolean(asRegExpObject(slotBase)->regExp()->multiline()));
+    return jsBoolean(asRegExpObject(slotBase)->regExp()->multiline());
 }
 
 template <typename CharacterType>
@@ -281,14 +276,12 @@ static inline JSValue regExpObjectSourceInternal(ExecState* exec, String pattern
     return jsString(exec, result.toString());
 }
 
-    
-    
-EncodedJSValue regExpObjectSource(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
+JSValue regExpObjectSource(ExecState* exec, JSValue slotBase, PropertyName)
 {
     String pattern = asRegExpObject(slotBase)->regExp()->pattern();
     if (pattern.is8Bit())
-        return JSValue::encode(regExpObjectSourceInternal(exec, pattern, pattern.characters8(), pattern.length()));
-    return JSValue::encode(regExpObjectSourceInternal(exec, pattern, pattern.characters16(), pattern.length()));
+        return regExpObjectSourceInternal(exec, pattern, pattern.characters8(), pattern.length());
+    return regExpObjectSourceInternal(exec, pattern, pattern.characters16(), pattern.length());
 }
 
 void RegExpObject::put(JSCell* cell, ExecState* exec, PropertyName propertyName, JSValue value, PutPropertySlot& slot)
index e777265..34b6ad9 100644 (file)
@@ -1,3 +1,83 @@
+2013-12-05  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r160133.
+        http://trac.webkit.org/changeset/160133
+        https://bugs.webkit.org/show_bug.cgi?id=125325
+
+        broke bindings tests on all the bots (Requested by thorton on
+        #webkit).
+
+        * bindings/js/JSCSSStyleDeclarationCustom.cpp:
+        (WebCore::cssPropertyGetterPixelOrPosPrefixCallback):
+        (WebCore::cssPropertyGetterCallback):
+        * bindings/js/JSDOMBinding.cpp:
+        (WebCore::objectToStringFunctionGetter):
+        * bindings/js/JSDOMBinding.h:
+        * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
+        (WebCore::JSDOMMimeTypeArray::nameGetter):
+        * bindings/js/JSDOMPluginArrayCustom.cpp:
+        (WebCore::JSDOMPluginArray::nameGetter):
+        * bindings/js/JSDOMPluginCustom.cpp:
+        (WebCore::JSDOMPlugin::nameGetter):
+        * bindings/js/JSDOMStringMapCustom.cpp:
+        (WebCore::JSDOMStringMap::nameGetter):
+        * bindings/js/JSDOMWindowCustom.cpp:
+        (WebCore::nonCachingStaticFunctionGetter):
+        (WebCore::childFrameGetter):
+        (WebCore::indexGetter):
+        (WebCore::namedItemGetter):
+        * bindings/js/JSHTMLAllCollectionCustom.cpp:
+        (WebCore::JSHTMLAllCollection::nameGetter):
+        * bindings/js/JSHTMLCollectionCustom.cpp:
+        (WebCore::JSHTMLCollection::nameGetter):
+        * bindings/js/JSHTMLDocumentCustom.cpp:
+        (WebCore::JSHTMLDocument::nameGetter):
+        * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
+        (WebCore::JSHTMLFormControlsCollection::nameGetter):
+        * bindings/js/JSHTMLFormElementCustom.cpp:
+        (WebCore::JSHTMLFormElement::nameGetter):
+        * bindings/js/JSHTMLFrameSetElementCustom.cpp:
+        (WebCore::JSHTMLFrameSetElement::nameGetter):
+        * bindings/js/JSHistoryCustom.cpp:
+        (WebCore::nonCachingStaticBackFunctionGetter):
+        (WebCore::nonCachingStaticForwardFunctionGetter):
+        (WebCore::nonCachingStaticGoFunctionGetter):
+        * bindings/js/JSJavaScriptCallFrameCustom.cpp:
+        (WebCore::JSJavaScriptCallFrame::scopeType):
+        * bindings/js/JSLocationCustom.cpp:
+        (WebCore::nonCachingStaticReplaceFunctionGetter):
+        (WebCore::nonCachingStaticReloadFunctionGetter):
+        (WebCore::nonCachingStaticAssignFunctionGetter):
+        * bindings/js/JSNamedNodeMapCustom.cpp:
+        (WebCore::JSNamedNodeMap::nameGetter):
+        * bindings/js/JSNodeListCustom.cpp:
+        (WebCore::JSNodeList::nameGetter):
+        * bindings/js/JSPluginElementFunctions.cpp:
+        (WebCore::pluginElementPropertyGetter):
+        * bindings/js/JSPluginElementFunctions.h:
+        * bindings/js/JSRTCStatsResponseCustom.cpp:
+        (WebCore::JSRTCStatsResponse::nameGetter):
+        * bindings/js/JSStorageCustom.cpp:
+        (WebCore::JSStorage::nameGetter):
+        * bindings/js/JSStyleSheetListCustom.cpp:
+        (WebCore::JSStyleSheetList::nameGetter):
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateHeader):
+        (GenerateImplementation):
+        (GenerateParametersCheck):
+        * bridge/runtime_array.cpp:
+        (JSC::RuntimeArray::lengthGetter):
+        (JSC::RuntimeArray::indexGetter):
+        * bridge/runtime_array.h:
+        * bridge/runtime_method.cpp:
+        (JSC::RuntimeMethod::lengthGetter):
+        * bridge/runtime_method.h:
+        * bridge/runtime_object.cpp:
+        (JSC::Bindings::RuntimeObject::fallbackObjectGetter):
+        (JSC::Bindings::RuntimeObject::fieldGetter):
+        (JSC::Bindings::RuntimeObject::methodGetter):
+        * bridge/runtime_object.h:
+
 2013-12-05  Seokju Kwon  <seokju@webkit.org>
 
         Web Inspector: Remove 'cookiesString' output from Page.getCookies
index 0c04a19..c6213aa 100644 (file)
@@ -303,9 +303,9 @@ static inline JSValue cssPropertyGetterPixelOrPosPrefix(ExecState* exec, JSCSSSt
     return getPropertyValueFallback(exec, thisObj, propertyID);
 }
 
-static EncodedJSValue cssPropertyGetterPixelOrPosPrefixCallback(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, unsigned propertyID)
+static JSValue cssPropertyGetterPixelOrPosPrefixCallback(ExecState* exec, JSValue slotBase, unsigned propertyID)
 {
-    return JSValue::encode(cssPropertyGetterPixelOrPosPrefix(exec, jsCast<JSCSSStyleDeclaration*>(JSValue::decode(slotBase)), propertyID));
+    return cssPropertyGetterPixelOrPosPrefix(exec, jsCast<JSCSSStyleDeclaration*>(asObject(slotBase)), propertyID);
 }
 
 static inline JSValue cssPropertyGetter(ExecState* exec, JSCSSStyleDeclaration* thisObj, unsigned propertyID)
@@ -317,9 +317,9 @@ static inline JSValue cssPropertyGetter(ExecState* exec, JSCSSStyleDeclaration*
     return getPropertyValueFallback(exec, thisObj, propertyID);
 }
 
-static EncodedJSValue cssPropertyGetterCallback(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, unsigned propertyID)
+static JSValue cssPropertyGetterCallback(ExecState* exec, JSValue slotBase, unsigned propertyID)
 {
-    return JSValue::encode(cssPropertyGetter(exec, jsCast<JSCSSStyleDeclaration*>(JSValue::decode(slotBase)), propertyID));
+    return cssPropertyGetter(exec, jsCast<JSCSSStyleDeclaration*>(asObject(slotBase)), propertyID);
 }
 
 bool JSCSSStyleDeclaration::getOwnPropertySlotDelegate(ExecState*, PropertyName propertyIdentifier, PropertySlot& slot)
index decc4d0..e6a9eea 100644 (file)
@@ -271,9 +271,9 @@ void printErrorMessageForFrame(Frame* frame, const String& message)
     frame->document()->domWindow()->printErrorMessage(message);
 }
 
-EncodedJSValue objectToStringFunctionGetter(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName propertyName)
+JSValue objectToStringFunctionGetter(ExecState* exec, JSValue, PropertyName propertyName)
 {
-    return JSValue::encode(JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 0, propertyName.publicName(), objectProtoFuncToString));
+    return JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 0, propertyName.publicName(), objectProtoFuncToString);
 }
 
 Structure* getCachedDOMStructure(JSDOMGlobalObject* globalObject, const ClassInfo* classInfo)
index 396b330..1cfe7e1 100644 (file)
@@ -572,7 +572,7 @@ bool shouldAllowAccessToFrame(JSC::ExecState*, Frame*, String& message);
 bool shouldAllowAccessToDOMWindow(JSC::ExecState*, DOMWindow&, String& message);
 
 void printErrorMessageForFrame(Frame*, const String& message);
-JSC::EncodedJSValue objectToStringFunctionGetter(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
+JSC::JSValue objectToStringFunctionGetter(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
 
 inline JSC::JSValue jsStringWithCache(JSC::ExecState* exec, const String& s)
 {
index e1c9105..2985bdf 100644 (file)
@@ -33,12 +33,10 @@ bool JSDOMMimeTypeArray::canGetItemsForName(ExecState*, DOMMimeTypeArray* mimeTy
     return mimeTypeArray->canGetItemsForName(propertyNameToAtomicString(propertyName));
 }
 
-EncodedJSValue JSDOMMimeTypeArray::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)
+JSValue JSDOMMimeTypeArray::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
 {
-    JSDOMMimeTypeArray* thisObj = jsDynamicCast<JSDOMMimeTypeArray*>(JSValue::decode(slotBase));
-    if (!thisObj)
-        return throwVMTypeError(exec);
-    return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName))));
+    JSDOMMimeTypeArray* thisObj = jsCast<JSDOMMimeTypeArray*>(asObject(slotBase));
+    return toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName)));
 }
 
 } // namespace WebCore
index 807f63a..7e165d5 100644 (file)
@@ -33,10 +33,10 @@ bool JSDOMPluginArray::canGetItemsForName(ExecState*, DOMPluginArray* pluginArra
     return pluginArray->canGetItemsForName(propertyNameToAtomicString(propertyName));
 }
 
-EncodedJSValue JSDOMPluginArray::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)
+JSValue JSDOMPluginArray::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
 {
-    JSDOMPluginArray* thisObj = jsCast<JSDOMPluginArray*>(JSValue::decode(slotBase));
-    return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName))));
+    JSDOMPluginArray* thisObj = jsCast<JSDOMPluginArray*>(asObject(slotBase));
+    return toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName)));
 }
 
 } // namespace WebCore
index e23e60f..c196106 100644 (file)
@@ -32,10 +32,10 @@ bool JSDOMPlugin::canGetItemsForName(ExecState*, DOMPlugin* plugin, PropertyName
     return plugin->canGetItemsForName(propertyNameToAtomicString(propertyName));
 }
 
-EncodedJSValue JSDOMPlugin::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)
+JSValue JSDOMPlugin::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
 {
-    JSDOMPlugin* thisObj = jsCast<JSDOMPlugin*>(JSValue::decode(slotBase));
-    return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName))));
+    JSDOMPlugin* thisObj = jsCast<JSDOMPlugin*>(asObject(slotBase));
+    return toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName)));
 }
 
 } // namespace WebCore
index 6ff6b9c..5ea6752 100644 (file)
@@ -40,10 +40,10 @@ bool JSDOMStringMap::canGetItemsForName(ExecState*, DOMStringMap* impl, Property
     return impl->contains(propertyNameToAtomicString(propertyName));
 }
 
-EncodedJSValue JSDOMStringMap::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)
+JSValue JSDOMStringMap::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
 {
-    JSDOMStringMap* thisObj = jsCast<JSDOMStringMap*>(JSValue::decode(slotBase));
-    return JSValue::encode(jsStringWithCache(exec, thisObj->impl().item(propertyNameToAtomicString(propertyName))));
+    JSDOMStringMap* thisObj = jsCast<JSDOMStringMap*>(asObject(slotBase));
+    return jsStringWithCache(exec, thisObj->impl().item(propertyNameToAtomicString(propertyName)));
 }
 
 void JSDOMStringMap::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
index 2109af0..35abfd3 100644 (file)
@@ -67,24 +67,24 @@ void JSDOMWindow::visitChildren(JSCell* cell, SlotVisitor& visitor)
 }
 
 template<NativeFunction nativeFunction, int length>
-EncodedJSValue nonCachingStaticFunctionGetter(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName propertyName)
+JSValue nonCachingStaticFunctionGetter(ExecState* exec, JSValue, PropertyName propertyName)
 {
-    return JSValue::encode(JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), length, propertyName.publicName(), nativeFunction));
+    return JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), length, propertyName.publicName(), nativeFunction);
 }
 
-static EncodedJSValue childFrameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)
+static JSValue childFrameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
 {
-    return JSValue::encode(toJS(exec, jsCast<JSDOMWindow*>(JSValue::decode(slotBase))->impl().frame()->tree().scopedChild(propertyNameToAtomicString(propertyName))->document()->domWindow()));
+    return toJS(exec, jsCast<JSDOMWindow*>(asObject(slotBase))->impl().frame()->tree().scopedChild(propertyNameToAtomicString(propertyName))->document()->domWindow());
 }
 
-static EncodedJSValue indexGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, unsigned index)
+static JSValue indexGetter(ExecState* exec, JSValue slotBase, unsigned index)
 {
-    return JSValue::encode(toJS(exec, jsCast<JSDOMWindow*>(JSValue::decode(slotBase))->impl().frame()->tree().scopedChild(index)->document()->domWindow()));
+    return toJS(exec, jsCast<JSDOMWindow*>(asObject(slotBase))->impl().frame()->tree().scopedChild(index)->document()->domWindow());
 }
 
-static EncodedJSValue namedItemGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)
+static JSValue namedItemGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
 {
-    JSDOMWindowBase* thisObj = jsCast<JSDOMWindow*>(JSValue::decode(slotBase));
+    JSDOMWindowBase* thisObj = jsCast<JSDOMWindow*>(asObject(slotBase));
     Document* document = thisObj->impl().frame()->document();
 
     ASSERT(BindingSecurity::shouldAllowAccessToDOMWindow(exec, thisObj->impl()));
@@ -93,15 +93,15 @@ static EncodedJSValue namedItemGetter(ExecState* exec, EncodedJSValue slotBase,
 
     AtomicStringImpl* atomicPropertyName = findAtomicString(propertyName);
     if (!atomicPropertyName || !toHTMLDocument(document)->hasWindowNamedItem(*atomicPropertyName))
-        return JSValue::encode(jsUndefined());
+        return jsUndefined();
 
     if (UNLIKELY(toHTMLDocument(document)->windowNamedItemContainsMultipleElements(*atomicPropertyName))) {
         RefPtr<HTMLCollection> collection = document->windowNamedItems(atomicPropertyName);
         ASSERT(collection->length() > 1);
-        return JSValue::encode(toJS(exec, thisObj->globalObject(), WTF::getPtr(collection)));
+        return toJS(exec, thisObj->globalObject(), WTF::getPtr(collection));
     }
 
-    return JSValue::encode(toJS(exec, thisObj->globalObject(), toHTMLDocument(document)->windowNamedItem(*atomicPropertyName)));
+    return toJS(exec, thisObj->globalObject(), toHTMLDocument(document)->windowNamedItem(*atomicPropertyName));
 }
 
 bool JSDOMWindow::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
index 227c34d..11f5519 100644 (file)
@@ -100,10 +100,10 @@ bool JSHTMLAllCollection::canGetItemsForName(ExecState*, HTMLAllCollection* coll
     return collection->hasNamedItem(propertyNameToAtomicString(propertyName));
 }
 
-EncodedJSValue JSHTMLAllCollection::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)
+JSValue JSHTMLAllCollection::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
 {
-    JSHTMLAllCollection* thisObj = jsCast<JSHTMLAllCollection*>(JSValue::decode(slotBase));
-    return JSValue::encode(getNamedItems(exec, thisObj, propertyName));
+    JSHTMLAllCollection* thisObj = jsCast<JSHTMLAllCollection*>(asObject(slotBase));
+    return getNamedItems(exec, thisObj, propertyName);
 }
 
 JSValue JSHTMLAllCollection::item(ExecState* exec)
index eecc08b..26a2c2c 100644 (file)
@@ -45,11 +45,11 @@ bool JSHTMLCollection::canGetItemsForName(ExecState*, HTMLCollection* collection
     return collection->hasNamedItem(propertyNameToAtomicString(propertyName));
 }
 
-EncodedJSValue JSHTMLCollection::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)
+JSValue JSHTMLCollection::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
 {
-    JSHTMLCollection* collection = jsCast<JSHTMLCollection*>(JSValue::decode(slotBase));
+    JSHTMLCollection* collection = jsCast<JSHTMLCollection*>(asObject(slotBase));
     const AtomicString& name = propertyNameToAtomicString(propertyName);
-    return JSValue::encode(toJS(exec, collection->globalObject(), collection->impl().namedItem(name)));
+    return toJS(exec, collection->globalObject(), collection->impl().namedItem(name));
 }
 
 JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, HTMLCollection* collection)
index 7e7bb5a..3f4caf0 100644 (file)
@@ -57,28 +57,28 @@ bool JSHTMLDocument::canGetItemsForName(ExecState*, HTMLDocument* document, Prop
     return atomicPropertyName && document->hasDocumentNamedItem(*atomicPropertyName);
 }
 
-EncodedJSValue JSHTMLDocument::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)
+JSValue JSHTMLDocument::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
 {
-    JSHTMLDocument* thisObj = jsCast<JSHTMLDocument*>(JSValue::decode(slotBase));
+    JSHTMLDocument* thisObj = jsCast<JSHTMLDocument*>(asObject(slotBase));
     HTMLDocument& document = thisObj->impl();
 
     AtomicStringImpl* atomicPropertyName = findAtomicString(propertyName);
     if (!atomicPropertyName || !document.hasDocumentNamedItem(*atomicPropertyName))
-        return JSValue::encode(jsUndefined());
+        return jsUndefined();
 
     if (UNLIKELY(document.documentNamedItemContainsMultipleElements(*atomicPropertyName))) {
         RefPtr<HTMLCollection> collection = document.documentNamedItems(atomicPropertyName);
         ASSERT(collection->length() > 1);
-        return JSValue::encode(toJS(exec, thisObj->globalObject(), WTF::getPtr(collection)));
+        return toJS(exec, thisObj->globalObject(), WTF::getPtr(collection));
     }
 
     Element* element = document.documentNamedItem(*atomicPropertyName);
     if (UNLIKELY(element->hasTagName(iframeTag))) {
         if (Frame* frame = toHTMLIFrameElement(element)->contentFrame())
-            return JSValue::encode(toJS(exec, frame));
+            return toJS(exec, frame);
     }
 
-    return JSValue::encode(toJS(exec, thisObj->globalObject(), element));
+    return toJS(exec, thisObj->globalObject(), element);
 }
 
 // Custom attributes
index fc41eb6..9008765 100644 (file)
@@ -57,10 +57,10 @@ bool JSHTMLFormControlsCollection::canGetItemsForName(ExecState*, HTMLFormContro
     return collection->hasNamedItem(propertyNameToAtomicString(propertyName));
 }
 
-EncodedJSValue JSHTMLFormControlsCollection::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)
+JSValue JSHTMLFormControlsCollection::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
 {
-    JSHTMLFormControlsCollection* thisObj = jsCast<JSHTMLFormControlsCollection*>(JSValue::decode(slotBase));
-    return JSValue::encode(getNamedItems(exec, thisObj, propertyName));
+    JSHTMLFormControlsCollection* thisObj = jsCast<JSHTMLFormControlsCollection*>(asObject(slotBase));
+    return getNamedItems(exec, thisObj, propertyName);
 }
 
 JSValue JSHTMLFormControlsCollection::namedItem(ExecState* exec)
index 4168872..302f883 100644 (file)
@@ -42,21 +42,21 @@ bool JSHTMLFormElement::canGetItemsForName(ExecState*, HTMLFormElement* form, Pr
     return form->hasNamedElement(propertyNameToAtomicString(propertyName));
 }
 
-EncodedJSValue JSHTMLFormElement::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)
+JSValue JSHTMLFormElement::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
 {
-    JSHTMLFormElement* jsForm = jsCast<JSHTMLFormElement*>(JSValue::decode(slotBase));
+    JSHTMLFormElement* jsForm = jsCast<JSHTMLFormElement*>(asObject(slotBase));
     HTMLFormElement& form = jsForm->impl();
 
     Vector<Ref<Element>> namedItems;
     form.getNamedElements(propertyNameToAtomicString(propertyName), namedItems);
     
     if (namedItems.isEmpty())
-        return JSValue::encode(jsUndefined());
+        return jsUndefined();
     if (namedItems.size() == 1)
-        return JSValue::encode(toJS(exec, jsForm->globalObject(), &namedItems[0].get()));
+        return toJS(exec, jsForm->globalObject(), &namedItems[0].get());
 
     // FIXME: HTML5 specifies that this should be a RadioNodeList.
-    return JSValue::encode(toJS(exec, jsForm->globalObject(), StaticElementList::adopt(namedItems).get()));
+    return toJS(exec, jsForm->globalObject(), StaticElementList::adopt(namedItems).get());
 }
 
 }
index 6df61d1..f89c85b 100644 (file)
@@ -47,15 +47,15 @@ bool JSHTMLFrameSetElement::canGetItemsForName(ExecState*, HTMLFrameSetElement*
     return frame && frame->hasTagName(frameTag);
 }
 
-EncodedJSValue JSHTMLFrameSetElement::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)
+JSValue JSHTMLFrameSetElement::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
 {
-    HTMLElement& element = jsCast<JSHTMLElement*>(JSValue::decode(slotBase))->impl();
+    HTMLElement& element = jsCast<JSHTMLElement*>(asObject(slotBase))->impl();
     Node* frameElement = element.children()->namedItem(propertyNameToAtomicString(propertyName));
     if (Document* document = toHTMLFrameElement(frameElement)->contentDocument()) {
         if (JSDOMWindowShell* window = toJSDOMWindowShell(document->frame(), currentWorld(exec)))
-            return JSValue::encode(window);
+            return window;
     }
-    return JSValue::encode(jsUndefined());
+    return jsUndefined();
 }
 
 } // namespace WebCore
index 09b12a2..5ea6b38 100644 (file)
@@ -38,19 +38,19 @@ using namespace JSC;
 
 namespace WebCore {
 
-static EncodedJSValue nonCachingStaticBackFunctionGetter(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName propertyName)
+static JSValue nonCachingStaticBackFunctionGetter(ExecState* exec, JSValue, PropertyName propertyName)
 {
-    return JSValue::encode(JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 0, propertyName.publicName(), jsHistoryPrototypeFunctionBack));
+    return JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 0, propertyName.publicName(), jsHistoryPrototypeFunctionBack);
 }
 
-static EncodedJSValue nonCachingStaticForwardFunctionGetter(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName propertyName)
+static JSValue nonCachingStaticForwardFunctionGetter(ExecState* exec, JSValue, PropertyName propertyName)
 {
-    return JSValue::encode(JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 0, propertyName.publicName(), jsHistoryPrototypeFunctionForward));
+    return JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 0, propertyName.publicName(), jsHistoryPrototypeFunctionForward);
 }
 
-static EncodedJSValue nonCachingStaticGoFunctionGetter(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName propertyName)
+static JSValue nonCachingStaticGoFunctionGetter(ExecState* exec, JSValue, PropertyName propertyName)
 {
-    return JSValue::encode(JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 1, propertyName.publicName(), jsHistoryPrototypeFunctionGo));
+    return JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 1, propertyName.publicName(), jsHistoryPrototypeFunctionGo);
 }
 
 bool JSHistory::getOwnPropertySlotDelegate(ExecState* exec, PropertyName propertyName, PropertySlot& slot)
index 953546e..65e092a 100644 (file)
@@ -106,17 +106,17 @@ JSValue JSJavaScriptCallFrame::scopeType(ExecState* exec)
             if (!foundLocalScope) {
                 // First activation object is local scope, each successive activation object is closure.
                 if (!index)
-                    return JSValue::decode(jsJavaScriptCallFrameLOCAL_SCOPE(exec, EncodedJSValue(), EncodedJSValue(), Identifier()));
+                    return jsJavaScriptCallFrameLOCAL_SCOPE(exec, JSValue(), Identifier());
                 foundLocalScope = true;
             } else if (!index)
-                return JSValue::decode(jsJavaScriptCallFrameCLOSURE_SCOPE(exec, EncodedJSValue(), EncodedJSValue(), Identifier()));
+                return jsJavaScriptCallFrameCLOSURE_SCOPE(exec, JSValue(), Identifier());
         }
 
         if (!index) {
             // Last in the chain is global scope.
             if (++iter == end)
-                return JSValue::decode(jsJavaScriptCallFrameGLOBAL_SCOPE(exec, EncodedJSValue(), EncodedJSValue(), Identifier()));
-            return JSValue::decode(jsJavaScriptCallFrameWITH_SCOPE(exec, EncodedJSValue(), EncodedJSValue(), Identifier()));
+                return jsJavaScriptCallFrameGLOBAL_SCOPE(exec, JSValue(), Identifier());
+            return jsJavaScriptCallFrameWITH_SCOPE(exec, JSValue(), Identifier());
         }
 
         --index;
index c99f904..5b4ad26 100644 (file)
@@ -30,19 +30,19 @@ using namespace JSC;
 
 namespace WebCore {
 
-static EncodedJSValue nonCachingStaticReplaceFunctionGetter(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName propertyName)
+static JSValue nonCachingStaticReplaceFunctionGetter(ExecState* exec, JSValue, PropertyName propertyName)
 {
-    return JSValue::encode(JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 1, propertyName.publicName(), jsLocationPrototypeFunctionReplace));
+    return JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 1, propertyName.publicName(), jsLocationPrototypeFunctionReplace);
 }
 
-static EncodedJSValue nonCachingStaticReloadFunctionGetter(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName propertyName)
+static JSValue nonCachingStaticReloadFunctionGetter(ExecState* exec, JSValue, PropertyName propertyName)
 {
-    return JSValue::encode(JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 0, propertyName.publicName(), jsLocationPrototypeFunctionReload));
+    return JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 0, propertyName.publicName(), jsLocationPrototypeFunctionReload);
 }
 
-static EncodedJSValue nonCachingStaticAssignFunctionGetter(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName propertyName)
+static JSValue nonCachingStaticAssignFunctionGetter(ExecState* exec, JSValue, PropertyName propertyName)
 {
-    return JSValue::encode(JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 1, propertyName.publicName(), jsLocationPrototypeFunctionAssign));
+    return JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 1, propertyName.publicName(), jsLocationPrototypeFunctionAssign);
 }
 
 bool JSLocation::getOwnPropertySlotDelegate(ExecState* exec, PropertyName propertyName, PropertySlot& slot)
index 5e3c898..940ce50 100644 (file)
@@ -40,10 +40,10 @@ bool JSNamedNodeMap::canGetItemsForName(ExecState*, NamedNodeMap* impl, Property
     return impl->getNamedItem(propertyNameToAtomicString(propertyName));
 }
 
-EncodedJSValue JSNamedNodeMap::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)
+JSValue JSNamedNodeMap::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
 {
-    JSNamedNodeMap* thisObj = jsCast<JSNamedNodeMap*>(JSValue::decode(slotBase));
-    return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().getNamedItem(propertyNameToAtomicString(propertyName))));
+    JSNamedNodeMap* thisObj = jsCast<JSNamedNodeMap*>(asObject(slotBase));
+    return toJS(exec, thisObj->globalObject(), thisObj->impl().getNamedItem(propertyNameToAtomicString(propertyName)));
 }
 
 } // namespace WebCore
index 4aa3743..29e9e88 100644 (file)
@@ -56,10 +56,10 @@ bool JSNodeList::canGetItemsForName(ExecState*, NodeList* impl, PropertyName pro
     return impl->namedItem(propertyNameToAtomicString(propertyName));
 }
 
-EncodedJSValue JSNodeList::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)
+JSValue JSNodeList::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
 {
-    JSNodeList* thisObj = jsCast<JSNodeList*>(JSValue::decode(slotBase));
-    return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName))));
+    JSNodeList* thisObj = jsCast<JSNodeList*>(asObject(slotBase));
+    return toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName)));
 }
 
 } // namespace WebCore
index 97881c6..adb3e3a 100644 (file)
@@ -100,14 +100,14 @@ JSObject* pluginScriptObject(ExecState* exec, JSHTMLElement* jsHTMLElement)
     return instance->createRuntimeObject(exec);
 }
     
-EncodedJSValue pluginElementPropertyGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)
+JSValue pluginElementPropertyGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
 {
-    JSHTMLElement* element = jsCast<JSHTMLElement*>(JSValue::decode(slotBase));
+    JSHTMLElement* element = jsCast<JSHTMLElement*>(asObject(slotBase));
     JSObject* scriptObject = pluginScriptObject(exec, element);
     if (!scriptObject)
-        return JSValue::encode(jsUndefined());
+        return jsUndefined();
     
-    return JSValue::encode(scriptObject->get(exec, propertyName));
+    return scriptObject->get(exec, propertyName);
 }
 
 bool pluginElementCustomGetOwnPropertySlot(ExecState* exec, PropertyName propertyName, PropertySlot& slot, JSHTMLElement* element)
index 8a2e99d..7ad37dc 100644 (file)
@@ -38,7 +38,7 @@ namespace WebCore {
     JSC::Bindings::Instance* pluginInstance(HTMLElement&);
     JSC::JSObject* pluginScriptObject(JSC::ExecState*, JSHTMLElement*);
 
-    JSC::EncodedJSValue pluginElementPropertyGetter(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
+    JSC::JSValue pluginElementPropertyGetter(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
     bool pluginElementCustomGetOwnPropertySlot(JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&, JSHTMLElement*);
     bool pluginElementCustomPut(JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSHTMLElement*, JSC::PutPropertySlot&);
     JSC::CallType pluginElementGetCallData(JSHTMLElement*, JSC::CallData&);
index 821dc1b..ccddf0e 100644 (file)
@@ -40,10 +40,10 @@ bool JSRTCStatsResponse::canGetItemsForName(ExecState*, RTCStatsResponse* respon
     return response->canGetItemsForName(propertyNameToAtomicString(propertyName));
 }
 
-EncodedJSValue JSRTCStatsResponse::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)
+JSValue JSRTCStatsResponse::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
 {
-    JSRTCStatsResponse* thisObj = jsCast<JSRTCStatsResponse*>(JSValue::decode(slotBase));
-    return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName))));
+    JSRTCStatsResponse* thisObj = jsCast<JSRTCStatsResponse*>(asObject(slotBase));
+    return toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName)));
 }
 
 } // namespace WebCore
index f2e22a3..b27694c 100644 (file)
@@ -42,18 +42,18 @@ bool JSStorage::canGetItemsForName(ExecState* exec, Storage* impl, PropertyName
     return result;
 }
 
-EncodedJSValue JSStorage::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)
+JSValue JSStorage::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
 {
-    JSStorage* thisObj = jsCast<JSStorage*>(JSValue::decode(slotBase));
+    JSStorage* thisObj = jsCast<JSStorage*>(asObject(slotBase));
         
-    JSValue prototype = asObject(JSValue::decode(slotBase))->prototype();
+    JSValue prototype = asObject(slotBase)->prototype();
     if (prototype.isObject() && asObject(prototype)->hasProperty(exec, propertyName))
-        return JSValue::encode(asObject(prototype)->get(exec, propertyName));
+        return asObject(prototype)->get(exec, propertyName);
  
     ExceptionCode ec = 0;
     JSValue result = jsStringOrNull(exec, thisObj->impl().getItem(propertyNameToString(propertyName), ec));
     setDOMException(exec, ec);
-    return JSValue::encode(result);
+    return result;
 }
 
 bool JSStorage::deleteProperty(JSCell* cell, ExecState* exec, PropertyName propertyName)
index a5b4eef..9ac4e11 100644 (file)
@@ -40,12 +40,12 @@ bool JSStyleSheetList::canGetItemsForName(ExecState*, StyleSheetList* styleSheet
     return styleSheetList->getNamedItem(propertyNameToString(propertyName));
 }
 
-EncodedJSValue JSStyleSheetList::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)
+JSValue JSStyleSheetList::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
 {
-    JSStyleSheetList* thisObj = jsCast<JSStyleSheetList*>(JSValue::decode(slotBase));
+    JSStyleSheetList* thisObj = jsCast<JSStyleSheetList*>(asObject(slotBase));
     HTMLStyleElement* element = thisObj->impl().getNamedItem(propertyNameToString(propertyName));
     ASSERT(element);
-    return JSValue::encode(toJS(exec, thisObj->globalObject(), element->sheet()));
+    return toJS(exec, thisObj->globalObject(), element->sheet());
 }
 
 } // namespace WebCore
index af0442a..d6bfe85 100644 (file)
@@ -893,7 +893,7 @@ sub GenerateHeader
         if ($hasNumericIndexedGetter) {
             push(@headerContent, "    JSC::JSValue getByIndex(JSC::ExecState*, unsigned index);\n");
         } else {
-            push(@headerContent, "    static JSC::EncodedJSValue indexGetter(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, unsigned);\n");
+            push(@headerContent, "    static JSC::JSValue indexGetter(JSC::ExecState*, JSC::JSValue, unsigned);\n");
         }
     }
 
@@ -905,7 +905,7 @@ sub GenerateHeader
     if ($namedGetterFunction || $interface->extendedAttributes->{"CustomNamedGetter"}) {
         push(@headerContent, "private:\n");
         push(@headerContent, "    static bool canGetItemsForName(JSC::ExecState*, $interfaceName*, JSC::PropertyName);\n");
-        push(@headerContent, "    static JSC::EncodedJSValue nameGetter(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);\n");
+        push(@headerContent, "    static JSC::JSValue nameGetter(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);\n");
     }
 
     push(@headerContent, "};\n\n");
@@ -1041,7 +1041,7 @@ sub GenerateHeader
             my $conditionalString = $codeGenerator->GenerateConditionalString($attribute->signature);
             push(@headerContent, "#if ${conditionalString}\n") if $conditionalString;
             my $getter = GetAttributeGetterName($interfaceName, $className, $attribute);
-            push(@headerContent, "JSC::EncodedJSValue ${getter}(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);\n");
+            push(@headerContent, "JSC::JSValue ${getter}(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);\n");
             if (!IsReadonly($attribute)) {
                 my $setter = GetAttributeSetterName($interfaceName, $className, $attribute);
                 push(@headerContent, "void ${setter}(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);\n");
@@ -1051,7 +1051,7 @@ sub GenerateHeader
         
         if (!$interface->extendedAttributes->{"NoInterfaceObject"}) {
             my $getter = "js" . $interfaceName . "Constructor";
-            push(@headerContent, "JSC::EncodedJSValue ${getter}(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);\n");
+            push(@headerContent, "JSC::JSValue ${getter}(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);\n");
         }
 
         if ($interface->extendedAttributes->{"ReplaceableConstructor"}) {
@@ -1066,7 +1066,7 @@ sub GenerateHeader
             my $conditionalString = $codeGenerator->GenerateConditionalString($constant);
             push(@headerContent, "#if ${conditionalString}\n") if $conditionalString;
             my $getter = "js" . $interfaceName . $codeGenerator->WK_ucfirst($constant->name);
-            push(@headerContent, "JSC::EncodedJSValue ${getter}(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);\n");
+            push(@headerContent, "JSC::JSValue ${getter}(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);\n");
             push(@headerContent, "#endif\n") if $conditionalString;
         }
     }
@@ -1875,11 +1875,11 @@ sub GenerateImplementation
                 my $attributeConditionalString = $codeGenerator->GenerateConditionalString($attribute->signature);
                 push(@implContent, "#if ${attributeConditionalString}\n") if $attributeConditionalString;
 
-                push(@implContent, "EncodedJSValue ${getFunctionName}(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)\n");
+                push(@implContent, "JSValue ${getFunctionName}(ExecState* exec, JSValue slotBase, PropertyName)\n");
                 push(@implContent, "{\n");
 
                 if (!$attribute->isStatic || $attribute->signature->type =~ /Constructor$/) {
-                    push(@implContent, "    ${className}* castedThis = jsDynamicCast<$className*>(JSValue::decode(slotBase));\n");
+                    push(@implContent, "    ${className}* castedThis = jsCast<$className*>(asObject(slotBase));\n");
                 } else {
                     push(@implContent, "    UNUSED_PARAM(slotBase);\n");
                 }
@@ -1890,16 +1890,16 @@ sub GenerateImplementation
                         AddToImplIncludes("RuntimeEnabledFeatures.h");
                         my $enable_function = GetRuntimeEnableFunctionName($attribute->signature);
                         push(@implContent, "    if (!${enable_function}())\n");
-                        push(@implContent, "        return JSValue::encode(jsUndefined());\n");
+                        push(@implContent, "        return jsUndefined();\n");
                     } elsif ($attribute->signature->extendedAttributes->{"EnabledBySetting"}) {
                         AddToImplIncludes("Frame.h");
                         AddToImplIncludes("Settings.h");
                         my $enable_function = ToMethodName($attribute->signature->extendedAttributes->{"EnabledBySetting"}) . "Enabled";
                         push(@implContent, "    if (!castedThis->impl().frame())\n");
-                        push(@implContent, "        return JSValue::encode(jsUndefined());\n");
+                        push(@implContent, "        return jsUndefined();\n");
                         push(@implContent, "    Settings& settings = castedThis->impl().frame()->settings();\n");
                         push(@implContent, "    if (!settings.$enable_function())\n");
-                        push(@implContent, "        return JSValue::encode(jsUndefined());\n");
+                        push(@implContent, "        return jsUndefined();\n");
                     }
                 }
 
@@ -1911,15 +1911,15 @@ sub GenerateImplementation
                     !$attribute->signature->extendedAttributes->{"DoNotCheckSecurity"} &&
                     !$attribute->signature->extendedAttributes->{"DoNotCheckSecurityOnGetter"}) {
                     push(@implContent, "    if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, castedThis->impl()))\n");
-                    push(@implContent, "        return JSValue::encode(jsUndefined());\n");
+                    push(@implContent, "        return jsUndefined();\n");
                 }
 
                 if (HasCustomGetter($attribute->signature->extendedAttributes)) {
-                    push(@implContent, "    return JSValue::encode(castedThis->$implGetterFunctionName(exec));\n");
+                    push(@implContent, "    return castedThis->$implGetterFunctionName(exec);\n");
                 } elsif ($attribute->signature->extendedAttributes->{"CheckSecurityForNode"}) {
                     $implIncludes{"JSDOMBinding.h"} = 1;
                     push(@implContent, "    $interfaceName& impl = castedThis->impl();\n");
-                    push(@implContent, "    return JSValue::encode(shouldAllowAccessToNode(exec, impl." . $attribute->signature->name . "()) ? " . NativeToJSValue($attribute->signature, 0, $interfaceName, "impl.$implGetterFunctionName()", "castedThis") . " : jsNull());\n");
+                    push(@implContent, "    return shouldAllowAccessToNode(exec, impl." . $attribute->signature->name . "()) ? " . NativeToJSValue($attribute->signature, 0, $interfaceName, "impl.$implGetterFunctionName()", "castedThis") . " : jsNull();\n");
                 } elsif ($type eq "EventListener") {
                     $implIncludes{"EventListener.h"} = 1;
                     push(@implContent, "    UNUSED_PARAM(exec);\n");
@@ -1931,10 +1931,10 @@ sub GenerateImplementation
                     } else {
                         push(@implContent, "            if (JSObject* jsFunction = jsListener->jsFunction(impl.scriptExecutionContext()))\n");
                     }
-                    push(@implContent, "                return JSValue::encode(jsFunction);\n");
+                    push(@implContent, "                return jsFunction;\n");
                     push(@implContent, "        }\n");
                     push(@implContent, "    }\n");
-                    push(@implContent, "    return JSValue::encode(jsNull());\n");
+                    push(@implContent, "    return jsNull();\n");
                 } elsif ($attribute->signature->type =~ /Constructor$/) {
                     my $constructorType = $attribute->signature->type;
                     $constructorType =~ s/Constructor$//;
@@ -1943,10 +1943,10 @@ sub GenerateImplementation
                     if ($interfaceName eq "DOMWindow") {
                         my $named = ($constructorType =~ /Named$/) ? "Named" : "";
                         $constructorType =~ s/Named$//;
-                        push(@implContent, "    return JSValue::encode(JS" . $constructorType . "::get${named}Constructor(exec->vm(), castedThis));\n");
+                        push(@implContent, "    return JS" . $constructorType . "::get${named}Constructor(exec->vm(), castedThis);\n");
                     } else {
                        AddToImplIncludes("JS" . $constructorType . ".h", $attribute->signature->extendedAttributes->{"Conditional"});
-                       push(@implContent, "    return JSValue::encode(JS" . $constructorType . "::getConstructor(exec->vm(), castedThis->globalObject()));\n");
+                       push(@implContent, "    return JS" . $constructorType . "::getConstructor(exec->vm(), castedThis->globalObject());\n");
                     }
                 } elsif (!$attribute->signature->extendedAttributes->{"GetterRaisesException"}) {
                     push(@implContent, "    UNUSED_PARAM(exec);\n") if !$attribute->signature->extendedAttributes->{"CallWith"};
@@ -1957,10 +1957,10 @@ sub GenerateImplementation
                         $cacheIndex = $currentCachedAttribute;
                         $currentCachedAttribute++;
                         push(@implContent, "    if (JSValue cachedValue = castedThis->m_" . $attribute->signature->name . ".get())\n");
-                        push(@implContent, "        return JSValue::encode(cachedValue);\n");
+                        push(@implContent, "        return cachedValue;\n");
                     }
 
-                    my @callWithArgs = GenerateCallWith($attribute->signature->extendedAttributes->{"CallWith"}, \@implContent, "JSValue::encode(jsUndefined())");
+                    my @callWithArgs = GenerateCallWith($attribute->signature->extendedAttributes->{"CallWith"}, \@implContent, "jsUndefined()");
 
                     if ($svgListPropertyType) {
                         push(@implContent, "    JSValue result =  " . NativeToJSValue($attribute->signature, 0, $interfaceName, "castedThis->impl().$implGetterFunctionName(" . (join ", ", @callWithArgs) . ")", "castedThis") . ";\n");
@@ -1998,12 +1998,12 @@ sub GenerateImplementation
 
                         if ($isNullable) {
                             push(@implContent, "    if (isNull)\n");
-                            push(@implContent, "        return JSValue::encode(jsNull());\n");
+                            push(@implContent, "        return jsNull();\n");
                         }
                     }
 
                     push(@implContent, "    castedThis->m_" . $attribute->signature->name . ".set(exec->vm(), castedThis, result);\n") if ($attribute->signature->extendedAttributes->{"CachedAttribute"});
-                    push(@implContent, "    return JSValue::encode(result);\n");
+                    push(@implContent, "    return result;\n");
 
                 } else {
                     my @arguments = ("ec");
@@ -2014,7 +2014,7 @@ sub GenerateImplementation
                         unshift(@arguments, "isNull");
                     }
 
-                    unshift(@arguments, GenerateCallWith($attribute->signature->extendedAttributes->{"CallWith"}, \@implContent, "JSValue::encode(jsUndefined())"));
+                    unshift(@arguments, GenerateCallWith($attribute->signature->extendedAttributes->{"CallWith"}, \@implContent, "jsUndefined()"));
 
                     if ($svgPropertyOrListPropertyType) {
                         push(@implContent, "    $svgPropertyOrListPropertyType impl(*castedThis->impl());\n");
@@ -2026,11 +2026,11 @@ sub GenerateImplementation
 
                     if ($isNullable) {
                         push(@implContent, "    if (isNull)\n");
-                        push(@implContent, "        return JSValue::encode(jsNull());\n");
+                        push(@implContent, "        return jsNull();\n");
                     }
 
                     push(@implContent, "    setDOMException(exec, ec);\n");
-                    push(@implContent, "    return JSValue::encode(result);\n");
+                    push(@implContent, "    return result;\n");
                 }
 
                 push(@implContent, "}\n\n");
@@ -2043,16 +2043,16 @@ sub GenerateImplementation
             if (!$interface->extendedAttributes->{"NoInterfaceObject"}) {
                 my $constructorFunctionName = "js" . $interfaceName . "Constructor";
 
-                push(@implContent, "EncodedJSValue ${constructorFunctionName}(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)\n");
+                push(@implContent, "JSValue ${constructorFunctionName}(ExecState* exec, JSValue slotBase, PropertyName)\n");
                 push(@implContent, "{\n");
-                push(@implContent, "    ${className}* domObject = jsDynamicCast<$className*>(JSValue::decode(slotBase));\n");
+                push(@implContent, "    ${className}* domObject = jsCast<$className*>(asObject(slotBase));\n");
 
                 if ($interface->extendedAttributes->{"CheckSecurity"}) {
                     push(@implContent, "    if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, domObject->impl()))\n");
-                    push(@implContent, "        return JSValue::encode(jsUndefined());\n");
+                    push(@implContent, "        return jsUndefined();\n");
                 }
 
-                push(@implContent, "    return JSValue::encode(${className}::getConstructor(exec->vm(), domObject->globalObject()));\n");
+                push(@implContent, "    return ${className}::getConstructor(exec->vm(), domObject->globalObject());\n");
                 push(@implContent, "}\n\n");
             }
         }
@@ -2384,9 +2384,9 @@ sub GenerateImplementation
                     push(@implContent, "        return throwVMTypeError(exec);\n");
                 } else {
                     push(@implContent, "    JSValue thisValue = exec->hostThisValue();\n");
-                    push(@implContent, "    $className* castedThis = jsDynamicCast<$className*>(thisValue);\n");
-                    push(@implContent, "    if (!castedThis)\n");
+                    push(@implContent, "    if (!thisValue.inherits(${className}::info()))\n");
                     push(@implContent, "        return throwVMTypeError(exec);\n");
+                    push(@implContent, "    $className* castedThis = jsCast<$className*>(asObject(thisValue));\n");
                 }
 
                 push(@implContent, "    ASSERT_GC_OBJECT_INHERITS(castedThis, ${className}::info());\n");
@@ -2484,13 +2484,13 @@ sub GenerateImplementation
             }
 
             # FIXME: this casts into int to match our previous behavior which turned 0xFFFFFFFF in -1 for NodeFilter.SHOW_ALL
-            push(@implContent, "EncodedJSValue ${getter}(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName)\n");
+            push(@implContent, "JSValue ${getter}(ExecState* exec, JSValue, PropertyName)\n");
             push(@implContent, "{\n");
             if ($constant->type eq "DOMString") {
-                push(@implContent, "    return JSValue::encode(jsStringOrNull(exec, String(" . $constant->value . ")));\n");
+                push(@implContent, "    return jsStringOrNull(exec, String(" . $constant->value . "));\n");
             } else {
                 push(@implContent, "    UNUSED_PARAM(exec);\n");
-                push(@implContent, "    return JSValue::encode(jsNumber(static_cast<int>(" . $constant->value . ")));\n");
+                push(@implContent, "    return jsNumber(static_cast<int>(" . $constant->value . "));\n");
             }
             push(@implContent, "}\n\n");
             push(@implContent, "#endif\n") if $conditional;
@@ -2498,15 +2498,15 @@ sub GenerateImplementation
     }
 
     if ($indexedGetterFunction && !$hasNumericIndexedGetter) {
-        push(@implContent, "\nEncodedJSValue ${className}::indexGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, unsigned index)\n");
+        push(@implContent, "\nJSValue ${className}::indexGetter(ExecState* exec, JSValue slotBase, unsigned index)\n");
         push(@implContent, "{\n");
-        push(@implContent, "    ${className}* thisObj = jsCast<$className*>(JSValue::decode(slotBase));\n");
+        push(@implContent, "    ${className}* thisObj = jsCast<$className*>(asObject(slotBase));\n");
         push(@implContent, "    ASSERT_GC_OBJECT_INHERITS(thisObj, info());\n");
         if ($indexedGetterFunction->signature->type eq "DOMString") {
             $implIncludes{"URL.h"} = 1;
-            push(@implContent, "    return JSValue::encode(jsStringOrUndefined(exec, thisObj->impl().item(index)));\n");
+            push(@implContent, "    return jsStringOrUndefined(exec, thisObj->impl().item(index));\n");
         } else {
-            push(@implContent, "    return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().item(index)));\n");
+            push(@implContent, "    return toJS(exec, thisObj->globalObject(), thisObj->impl().item(index));\n");
         }
         push(@implContent, "}\n\n");
         if ($interfaceName =~ /^HTML\w*Collection$/ or $interfaceName eq "RadioNodeList") {
@@ -2537,10 +2537,10 @@ sub GenerateImplementation
             push(@implContent, "{\n");
             push(@implContent, "    return collection->hasNamedItem(propertyNameToAtomicString(propertyName));\n");
             push(@implContent, "}\n\n");
-            push(@implContent, "EncodedJSValue ${className}::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)\n");
+            push(@implContent, "JSValue ${className}::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)\n");
             push(@implContent, "{\n");
-            push(@implContent, "    ${className}* thisObj = jsCast<$className*>(JSValue::decode(slotBase));\n");
-            push(@implContent, "    return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName))));\n");
+            push(@implContent, "    ${className}* thisObj = jsCast<$className*>(asObject(slotBase));\n");
+            push(@implContent, "    return toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName)));\n");
             push(@implContent, "}\n\n");
         }
     }
@@ -2731,7 +2731,7 @@ END
     if ((!$hasParent or $interface->extendedAttributes->{"JSGenerateToNativeObject"}) and !$interface->extendedAttributes->{"JSCustomToNativeObject"}) {
         push(@implContent, "$implType* to${interfaceName}(JSC::JSValue value)\n");
         push(@implContent, "{\n");
-        push(@implContent, "    return value.inherits(${className}::info()) ? &jsCast<$className*>(value)->impl() : 0");
+        push(@implContent, "    return value.inherits(${className}::info()) ? &jsCast<$className*>(asObject(value))->impl() : 0");
         push(@implContent, ";\n}\n");
     }
 
@@ -2871,7 +2871,7 @@ sub GenerateParametersCheck
                 push(@$outputArray, "            return throwVMTypeError(exec);\n");
                 if ($function->isStatic) {
                     AddToImplIncludes("CallbackFunction.h");
-                    push(@$outputArray, "        $name = createFunctionOnlyCallback<${callbackClassName}>(exec, jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), exec->uncheckedArgument($argsIndex));\n");
+                    push(@$outputArray, "        $name = createFunctionOnlyCallback<${callbackClassName}>(exec, static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), exec->uncheckedArgument($argsIndex));\n");
                 } else {
                     push(@$outputArray, "        $name = ${callbackClassName}::create(asObject(exec->uncheckedArgument($argsIndex)), castedThis->globalObject());\n");
                 }
@@ -2881,7 +2881,7 @@ sub GenerateParametersCheck
                 push(@$outputArray, "        return throwVMTypeError(exec);\n");
                 if ($function->isStatic) {
                     AddToImplIncludes("CallbackFunction.h");
-                    push(@$outputArray, "    RefPtr<$argType> $name = createFunctionOnlyCallback<${callbackClassName}>(exec, jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), exec->uncheckedArgument($argsIndex));\n");
+                    push(@$outputArray, "    RefPtr<$argType> $name = createFunctionOnlyCallback<${callbackClassName}>(exec, static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), exec->uncheckedArgument($argsIndex));\n");
                 } else {
                     push(@$outputArray, "    RefPtr<$argType> $name = ${callbackClassName}::create(asObject(exec->uncheckedArgument($argsIndex)), castedThis->globalObject());\n");
                 }
index c834d7c..fd0dbb8 100644 (file)
@@ -60,16 +60,16 @@ void RuntimeArray::destroy(JSCell* cell)
     static_cast<RuntimeArray*>(cell)->RuntimeArray::~RuntimeArray();
 }
 
-EncodedJSValue RuntimeArray::lengthGetter(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
+JSValue RuntimeArray::lengthGetter(ExecState*, JSValue slotBase, PropertyName)
 {
-    RuntimeArray* thisObj = jsCast<RuntimeArray*>(JSValue::decode(slotBase));
-    return JSValue::encode(jsNumber(thisObj->getLength()));
+    RuntimeArray* thisObj = static_cast<RuntimeArray*>(asObject(slotBase));
+    return jsNumber(thisObj->getLength());
 }
 
-EncodedJSValue RuntimeArray::indexGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, unsigned index)
+JSValue RuntimeArray::indexGetter(ExecState* exec, JSValue slotBase, unsigned index)
 {
-    RuntimeArray* thisObj = jsCast<RuntimeArray*>(JSValue::decode(slotBase));
-    return JSValue::encode(thisObj->getConcreteArray()->valueAt(exec, index));
+    RuntimeArray* thisObj = static_cast<RuntimeArray*>(asObject(slotBase));
+    return thisObj->getConcreteArray()->valueAt(exec, index);
 }
 
 void RuntimeArray::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
index 5e01f73..7800be5 100644 (file)
@@ -84,8 +84,8 @@ protected:
 
 private:
     RuntimeArray(ExecState*, Structure*);
-    static EncodedJSValue lengthGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-    static EncodedJSValue indexGetter(ExecState*, EncodedJSValue, EncodedJSValue, unsigned);
+    static JSValue lengthGetter(ExecState*, JSValue, PropertyName);
+    static JSValue indexGetter(ExecState*, JSValue, unsigned);
 
     BindingsArray* m_array;
 };
index f551ad0..6ad174f 100644 (file)
@@ -54,11 +54,11 @@ void RuntimeMethod::finishCreation(VM& vm, const String& ident)
     ASSERT(inherits(info()));
 }
 
-EncodedJSValue RuntimeMethod::lengthGetter(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
+JSValue RuntimeMethod::lengthGetter(ExecState*, JSValue slotBase, PropertyName)
 {
-    RuntimeMethod* thisObj = jsCast<RuntimeMethod*>(JSValue::decode(slotBase));
+    RuntimeMethod* thisObj = static_cast<RuntimeMethod*>(asObject(slotBase));
 
-    return JSValue::encode(jsNumber(thisObj->m_method->numParameters()));
+    return jsNumber(thisObj->m_method->numParameters());
 }
 
 bool RuntimeMethod::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot &slot)
index e141968..fffe61c 100644 (file)
@@ -67,7 +67,7 @@ protected:
     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
 
 private:
-    static EncodedJSValue lengthGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
+    static JSValue lengthGetter(ExecState*, JSValue, PropertyName);
 
     Bindings::Method* m_method;
 };
index 32524f4..ef479d0 100644 (file)
@@ -62,13 +62,13 @@ void RuntimeObject::invalidate()
     m_instance = 0;
 }
 
-EncodedJSValue RuntimeObject::fallbackObjectGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)
+JSValue RuntimeObject::fallbackObjectGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
 {
-    RuntimeObject* thisObj = jsCast<RuntimeObject*>(JSValue::decode(slotBase));
+    RuntimeObject* thisObj = static_cast<RuntimeObject*>(asObject(slotBase));
     RefPtr<Instance> instance = thisObj->m_instance;
 
     if (!instance)
-        return JSValue::encode(throwInvalidAccessError(exec));
+        return throwInvalidAccessError(exec);
     
     instance->begin();
 
@@ -77,16 +77,16 @@ EncodedJSValue RuntimeObject::fallbackObjectGetter(ExecState* exec, EncodedJSVal
 
     instance->end();
             
-    return JSValue::encode(result);
+    return result;
 }
 
-EncodedJSValue RuntimeObject::fieldGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)
+JSValue RuntimeObject::fieldGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
 {    
-    RuntimeObject* thisObj = jsCast<RuntimeObject*>(JSValue::decode(slotBase));
+    RuntimeObject* thisObj = static_cast<RuntimeObject*>(asObject(slotBase));
     RefPtr<Instance> instance = thisObj->m_instance;
 
     if (!instance)
-        return JSValue::encode(throwInvalidAccessError(exec));
+        return throwInvalidAccessError(exec);
     
     instance->begin();
 
@@ -96,16 +96,16 @@ EncodedJSValue RuntimeObject::fieldGetter(ExecState* exec, EncodedJSValue slotBa
     
     instance->end();
             
-    return JSValue::encode(result);
+    return result;
 }
 
-EncodedJSValue RuntimeObject::methodGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)
+JSValue RuntimeObject::methodGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
 {
-    RuntimeObject* thisObj = jsCast<RuntimeObject*>(JSValue::decode(slotBase));
+    RuntimeObject* thisObj = static_cast<RuntimeObject*>(asObject(slotBase));
     RefPtr<Instance> instance = thisObj->m_instance;
 
     if (!instance)
-        return JSValue::encode(throwInvalidAccessError(exec));
+        return throwInvalidAccessError(exec);
     
     instance->begin();
 
@@ -113,7 +113,7 @@ EncodedJSValue RuntimeObject::methodGetter(ExecState* exec, EncodedJSValue slotB
 
     instance->end();
             
-    return JSValue::encode(method);
+    return method;
 }
 
 bool RuntimeObject::getOwnPropertySlot(JSObject* object, ExecState *exec, PropertyName propertyName, PropertySlot& slot)
index 97b5550..385de34 100644 (file)
@@ -78,9 +78,9 @@ protected:
     static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesGetPropertyNames | Base::StructureFlags;
 
 private:
-    static EncodedJSValue fallbackObjectGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-    static EncodedJSValue fieldGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
-    static EncodedJSValue methodGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);
+    static JSValue fallbackObjectGetter(ExecState*, JSValue, PropertyName);
+    static JSValue fieldGetter(ExecState*, JSValue, PropertyName);
+    static JSValue methodGetter(ExecState*, JSValue, PropertyName);
 
     RefPtr<Instance> m_instance;
 };
index f59536c..ffa6d03 100644 (file)
@@ -1,3 +1,26 @@
+2013-12-05  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r160133.
+        http://trac.webkit.org/changeset/160133
+        https://bugs.webkit.org/show_bug.cgi?id=125325
+
+        broke bindings tests on all the bots (Requested by thorton on
+        #webkit).
+
+        * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
+        (WebKit::callMethod):
+        * WebProcess/Plugins/Netscape/JSNPObject.cpp:
+        (WebKit::callNPJSObject):
+        (WebKit::constructWithConstructor):
+        (WebKit::JSNPObject::propertyGetter):
+        (WebKit::JSNPObject::methodGetter):
+        * WebProcess/Plugins/Netscape/JSNPObject.h:
+        * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
+        (WebKit::NPRuntimeObjectMap::getOrCreateNPObject):
+        (WebKit::NPRuntimeObjectMap::finalize):
+        * WebProcess/WebPage/WebFrame.cpp:
+        (WebKit::WebFrame::counterValue):
+
 2013-12-05  Chris Fleizach  <cfleizach@apple.com>
 
         AX: Seed: safari extension installation crashes safari under voice over and freezes voice over
index d816cdc..4ea63d1 100644 (file)
@@ -59,13 +59,13 @@ void JSNPMethod::finishCreation(VM& vm, const String& name)
 
 static EncodedJSValue JSC_HOST_CALL callMethod(ExecState* exec)
 {
-    JSNPMethod* jsNPMethod = jsCast<JSNPMethod*>(exec->callee());
+    JSNPMethod* jsNPMethod = static_cast<JSNPMethod*>(exec->callee());
 
     JSValue thisValue = exec->hostThisValue();
 
     // Check if we're calling a method on the plug-in script object.
     if (thisValue.inherits(JSHTMLElement::info())) {
-        JSHTMLElement* element = jsCast<JSHTMLElement*>(asObject(thisValue));
+        JSHTMLElement* element = static_cast<JSHTMLElement*>(asObject(thisValue));
 
         // Try to get the script object from the element
         if (JSObject* scriptObject = pluginScriptObject(exec, element))
@@ -73,7 +73,7 @@ static EncodedJSValue JSC_HOST_CALL callMethod(ExecState* exec)
     }
 
     if (thisValue.inherits(JSNPObject::info())) {
-        JSNPObject* jsNPObject = jsCast<JSNPObject*>(asObject(thisValue));
+        JSNPObject* jsNPObject = static_cast<JSNPObject*>(asObject(thisValue));
 
         return JSValue::encode(jsNPObject->callMethod(exec, jsNPMethod->npIdentifier()));
     }
index 9674ca3..4447ab0 100644 (file)
@@ -225,7 +225,7 @@ static EncodedJSValue JSC_HOST_CALL callNPJSObject(ExecState* exec)
     JSObject* object = exec->callee();
     ASSERT(object->inherits(JSNPObject::info()));
 
-    return JSValue::encode(jsCast<JSNPObject*>(object)->callObject(exec));
+    return JSValue::encode(static_cast<JSNPObject*>(object)->callObject(exec));
 }
 
 JSC::CallType JSNPObject::getCallData(JSC::JSCell* cell, JSC::CallData& callData)
@@ -244,7 +244,7 @@ static EncodedJSValue JSC_HOST_CALL constructWithConstructor(ExecState* exec)
     JSObject* constructor = exec->callee();
     ASSERT(constructor->inherits(JSNPObject::info()));
 
-    return JSValue::encode(jsCast<JSNPObject*>(constructor)->callConstructor(exec));
+    return JSValue::encode(static_cast<JSNPObject*>(constructor)->callConstructor(exec));
 }
 
 ConstructType JSNPObject::getConstructData(JSCell* cell, ConstructData& constructData)
@@ -417,16 +417,16 @@ void JSNPObject::getOwnPropertyNames(JSObject* object, ExecState* exec, Property
     npnMemFree(identifiers);
 }
 
-EncodedJSValue JSNPObject::propertyGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)
+JSValue JSNPObject::propertyGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
 {
-    JSNPObject* thisObj = jsCast<JSNPObject*>(JSValue::decode(slotBase));
+    JSNPObject* thisObj = static_cast<JSNPObject*>(asObject(slotBase));
     ASSERT_GC_OBJECT_INHERITS(thisObj, info());
     
     if (!thisObj->m_npObject)
-        return JSValue::encode(throwInvalidAccessError(exec));
+        return throwInvalidAccessError(exec);
 
     if (!thisObj->m_npObject->_class->getProperty)
-        return JSValue::encode(jsUndefined());
+        return jsUndefined();
 
     NPVariant result;
     VOID_TO_NPVARIANT(result);
@@ -446,23 +446,23 @@ EncodedJSValue JSNPObject::propertyGetter(ExecState* exec, EncodedJSValue slotBa
     }
 
     if (!returnValue)
-        return JSValue::encode(jsUndefined());
+        return jsUndefined();
 
     JSValue propertyValue = thisObj->m_objectMap->convertNPVariantToJSValue(exec, thisObj->globalObject(), result);
     releaseNPVariantValue(&result);
-    return JSValue::encode(propertyValue);
+    return propertyValue;
 }
 
-EncodedJSValue JSNPObject::methodGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)
+JSValue JSNPObject::methodGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
 {
-    JSNPObject* thisObj = jsCast<JSNPObject*>(JSValue::decode(slotBase));
+    JSNPObject* thisObj = static_cast<JSNPObject*>(asObject(slotBase));
     ASSERT_GC_OBJECT_INHERITS(thisObj, info());
     
     if (!thisObj->m_npObject)
-        return JSValue::encode(throwInvalidAccessError(exec));
+        return throwInvalidAccessError(exec);
 
     NPIdentifier npIdentifier = npIdentifierFromIdentifier(propertyName);
-    return JSValue::encode(JSNPMethod::create(exec, thisObj->globalObject(), propertyName.publicName(), npIdentifier));
+    return JSNPMethod::create(exec, thisObj->globalObject(), propertyName.publicName(), npIdentifier);
 }
 
 JSObject* JSNPObject::throwInvalidAccessError(ExecState* exec)
index 250d26b..26ec45c 100644 (file)
@@ -95,8 +95,8 @@ private:
 
     static void getOwnPropertyNames(JSC::JSObject*, JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode);
 
-    static JSC::EncodedJSValue propertyGetter(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
-    static JSC::EncodedJSValue methodGetter(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);
+    static JSC::JSValue propertyGetter(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
+    static JSC::JSValue methodGetter(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
     static JSC::JSObject* throwInvalidAccessError(JSC::ExecState*);
 
     NPRuntimeObjectMap* m_objectMap;
index 56aa093..ae19984 100644 (file)
@@ -72,7 +72,7 @@ NPObject* NPRuntimeObjectMap::getOrCreateNPObject(VM& vm, JSObject* jsObject)
 {
     // If this is a JSNPObject, we can just get its underlying NPObject.
     if (jsObject->classInfo() == JSNPObject::info()) {
-        JSNPObject* jsNPObject = jsCast<JSNPObject*>(jsObject);
+        JSNPObject* jsNPObject = static_cast<JSNPObject*>(jsObject);
         NPObject* npObject = jsNPObject->npObject();
         
         retainNPObject(npObject);
@@ -302,7 +302,7 @@ void NPRuntimeObjectMap::addToInvalidationQueue(NPObject* npObject)
 
 void NPRuntimeObjectMap::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
 {
-    JSNPObject* object = jsCast<JSNPObject*>(handle.get().asCell());
+    JSNPObject* object = static_cast<JSNPObject*>(handle.get().asCell());
     weakRemove(m_jsNPObjects, static_cast<NPObject*>(context), object);
     addToInvalidationQueue(object->leakNPObject());
 }
index 64ba5e9..fe88bd7 100644 (file)
@@ -664,7 +664,7 @@ String WebFrame::counterValue(JSObjectRef element)
     if (!toJS(element)->inherits(JSElement::info()))
         return String();
 
-    return counterValueForElement(&jsCast<JSElement*>(toJS(element))->impl());
+    return counterValueForElement(&static_cast<JSElement*>(toJS(element))->impl());
 }
 
 String WebFrame::provisionalURL() const