Changeset 160204 in webkit
- Timestamp:
- Dec 5, 2013 5:19:42 PM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 51 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSCallbackObject.h
r160133 r160204 206 206 207 207 static JSCallbackObject* asCallbackObject(JSValue); 208 static JSCallbackObject* asCallbackObject(EncodedJSValue);209 208 210 209 static EncodedJSValue JSC_HOST_CALL call(ExecState*); … … 212 211 213 212 JSValue getStaticValue(ExecState*, PropertyName); 214 static EncodedJSValue staticFunctionGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);215 static EncodedJSValue callbackGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);213 static JSValue staticFunctionGetter(ExecState*, JSValue, PropertyName); 214 static JSValue callbackGetter(ExecState*, JSValue, PropertyName); 216 215 217 216 OwnPtr<JSCallbackObjectData> m_callbackObjectData; -
trunk/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h
r160133 r160204 51 51 52 52 template <class Parent> 53 inline JSCallbackObject<Parent>* JSCallbackObject<Parent>::asCallbackObject(EncodedJSValue value)54 {55 ASSERT(asObject(JSValue::decode(value))->inherits(info()));56 return jsCast<JSCallbackObject*>(asObject(JSValue::decode(value)));57 }58 59 template <class Parent>60 53 JSCallbackObject<Parent>::JSCallbackObject(ExecState* exec, Structure* structure, JSClassRef jsClass, void* data) 61 54 : Parent(exec->vm(), structure) … … 592 585 593 586 template <class Parent> 594 EncodedJSValue JSCallbackObject<Parent>::staticFunctionGetter(ExecState* exec, EncodedJSValue slotParent, EncodedJSValue, PropertyName propertyName)587 JSValue JSCallbackObject<Parent>::staticFunctionGetter(ExecState* exec, JSValue slotParent, PropertyName propertyName) 595 588 { 596 589 JSCallbackObject* thisObj = asCallbackObject(slotParent); … … 599 592 PropertySlot slot2(thisObj); 600 593 if (Parent::getOwnPropertySlot(thisObj, exec, propertyName, slot2)) 601 return JSValue::encode(slot2.getValue(exec, propertyName));594 return slot2.getValue(exec, propertyName); 602 595 603 596 if (StringImpl* name = propertyName.publicName()) { … … 609 602 JSObject* o = JSCallbackFunction::create(vm, thisObj->globalObject(), callAsFunction, name); 610 603 thisObj->putDirect(vm, propertyName, o, entry->attributes); 611 return JSValue::encode(o);604 return o; 612 605 } 613 606 } … … 616 609 } 617 610 618 return JSValue::encode(exec->vm().throwException(exec, createReferenceError(exec, ASCIILiteral("Static function property defined with NULL callAsFunction callback."))));619 } 620 621 template <class Parent> 622 EncodedJSValue JSCallbackObject<Parent>::callbackGetter(ExecState* exec, EncodedJSValue slotParent, EncodedJSValue, PropertyName propertyName)611 return exec->vm().throwException(exec, createReferenceError(exec, ASCIILiteral("Static function property defined with NULL callAsFunction callback."))); 612 } 613 614 template <class Parent> 615 JSValue JSCallbackObject<Parent>::callbackGetter(ExecState* exec, JSValue slotParent, PropertyName propertyName) 623 616 { 624 617 JSCallbackObject* thisObj = asCallbackObject(slotParent); … … 640 633 if (exception) { 641 634 exec->vm().throwException(exec, toJS(exec, exception)); 642 return JSValue::encode(jsUndefined());635 return jsUndefined(); 643 636 } 644 637 if (value) 645 return JSValue::encode(toJS(exec, value));646 } 647 } 648 } 649 650 return JSValue::encode(exec->vm().throwException(exec, createReferenceError(exec, ASCIILiteral("hasProperty callback returned true for a property that doesn't exist."))));638 return toJS(exec, value); 639 } 640 } 641 } 642 643 return exec->vm().throwException(exec, createReferenceError(exec, ASCIILiteral("hasProperty callback returned true for a property that doesn't exist."))); 651 644 } 652 645 -
trunk/Source/JavaScriptCore/ChangeLog
r160186 r160204 1 2013-12-05 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r160133. 4 http://trac.webkit.org/changeset/160133 5 https://bugs.webkit.org/show_bug.cgi?id=125325 6 7 broke bindings tests on all the bots (Requested by thorton on 8 #webkit). 9 10 * API/JSCallbackObject.h: 11 * API/JSCallbackObjectFunctions.h: 12 (JSC::::staticFunctionGetter): 13 (JSC::::callbackGetter): 14 * jit/JITOperations.cpp: 15 * runtime/JSActivation.cpp: 16 (JSC::JSActivation::argumentsGetter): 17 * runtime/JSActivation.h: 18 * runtime/JSFunction.cpp: 19 (JSC::JSFunction::argumentsGetter): 20 (JSC::JSFunction::callerGetter): 21 (JSC::JSFunction::lengthGetter): 22 (JSC::JSFunction::nameGetter): 23 * runtime/JSFunction.h: 24 * runtime/JSObject.h: 25 (JSC::PropertySlot::getValue): 26 * runtime/NumberConstructor.cpp: 27 (JSC::numberConstructorNaNValue): 28 (JSC::numberConstructorNegInfinity): 29 (JSC::numberConstructorPosInfinity): 30 (JSC::numberConstructorMaxValue): 31 (JSC::numberConstructorMinValue): 32 * runtime/PropertySlot.h: 33 * runtime/RegExpConstructor.cpp: 34 (JSC::regExpConstructorDollar1): 35 (JSC::regExpConstructorDollar2): 36 (JSC::regExpConstructorDollar3): 37 (JSC::regExpConstructorDollar4): 38 (JSC::regExpConstructorDollar5): 39 (JSC::regExpConstructorDollar6): 40 (JSC::regExpConstructorDollar7): 41 (JSC::regExpConstructorDollar8): 42 (JSC::regExpConstructorDollar9): 43 (JSC::regExpConstructorInput): 44 (JSC::regExpConstructorMultiline): 45 (JSC::regExpConstructorLastMatch): 46 (JSC::regExpConstructorLastParen): 47 (JSC::regExpConstructorLeftContext): 48 (JSC::regExpConstructorRightContext): 49 * runtime/RegExpObject.cpp: 50 (JSC::regExpObjectGlobal): 51 (JSC::regExpObjectIgnoreCase): 52 (JSC::regExpObjectMultiline): 53 (JSC::regExpObjectSource): 54 1 55 2013-12-05 Mark Lam <mark.lam@apple.com> 2 56 -
trunk/Source/JavaScriptCore/jit/JITOperations.cpp
r160133 r160204 223 223 Identifier ident(vm, uid); 224 224 225 return function(exec, JSValue::encode(base), JSValue::encode(base), ident);225 return JSValue::encode(function(exec, asObject(base), ident)); 226 226 } 227 227 -
trunk/Source/JavaScriptCore/runtime/JSActivation.cpp
r160133 r160204 211 211 } 212 212 213 EncodedJSValue JSActivation::argumentsGetter(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)214 { 215 JSActivation* activation = jsCast<JSActivation*>( JSValue::decode(slotBase));213 JSValue JSActivation::argumentsGetter(ExecState*, JSValue slotBase, PropertyName) 214 { 215 JSActivation* activation = jsCast<JSActivation*>(slotBase); 216 216 CallFrame* callFrame = CallFrame::create(reinterpret_cast<Register*>(activation->m_registers)); 217 217 ASSERT(!activation->isTornOff() && (callFrame->codeBlock()->usesArguments() || callFrame->codeBlock()->usesEval())); 218 218 if (activation->isTornOff() || !(callFrame->codeBlock()->usesArguments() || callFrame->codeBlock()->usesEval())) 219 return JSValue::encode(jsUndefined());219 return jsUndefined(); 220 220 221 221 VirtualRegister argumentsRegister = callFrame->codeBlock()->argumentsRegister(); 222 222 if (JSValue arguments = callFrame->uncheckedR(argumentsRegister.offset()).jsValue()) 223 return JSValue::encode(arguments);223 return arguments; 224 224 int realArgumentsRegister = unmodifiedArgumentsRegister(argumentsRegister).offset(); 225 225 … … 229 229 230 230 ASSERT(callFrame->uncheckedR(realArgumentsRegister).jsValue().inherits(Arguments::info())); 231 return JSValue::encode(callFrame->uncheckedR(realArgumentsRegister).jsValue());231 return callFrame->uncheckedR(realArgumentsRegister).jsValue(); 232 232 } 233 233 -
trunk/Source/JavaScriptCore/runtime/JSActivation.h
r160133 r160204 101 101 bool symbolTablePutWithAttributes(VM&, PropertyName, JSValue, unsigned attributes); 102 102 103 static EncodedJSValue argumentsGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);103 static JSValue argumentsGetter(ExecState*, JSValue, PropertyName); 104 104 105 105 static size_t allocationSize(SymbolTable*); -
trunk/Source/JavaScriptCore/runtime/JSFunction.cpp
r160133 r160204 213 213 } 214 214 215 EncodedJSValue JSFunction::argumentsGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)216 { 217 JSFunction* thisObj = jsCast<JSFunction*>( JSValue::decode(slotBase));215 JSValue JSFunction::argumentsGetter(ExecState* exec, JSValue slotBase, PropertyName) 216 { 217 JSFunction* thisObj = jsCast<JSFunction*>(slotBase); 218 218 ASSERT(!thisObj->isHostFunction()); 219 219 220 return JSValue::encode(retrieveArguments(exec, thisObj));220 return retrieveArguments(exec, thisObj); 221 221 } 222 222 … … 268 268 } 269 269 270 EncodedJSValue JSFunction::callerGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)271 { 272 JSFunction* thisObj = jsCast<JSFunction*>( JSValue::decode(slotBase));270 JSValue JSFunction::callerGetter(ExecState* exec, JSValue slotBase, PropertyName) 271 { 272 JSFunction* thisObj = jsCast<JSFunction*>(slotBase); 273 273 ASSERT(!thisObj->isHostFunction()); 274 274 JSValue caller = retrieveCallerFunction(exec, thisObj); … … 276 276 // See ES5.1 15.3.5.4 - Function.caller may not be used to retrieve a strict caller. 277 277 if (!caller.isObject() || !asObject(caller)->inherits(JSFunction::info())) 278 return JSValue::encode(caller);278 return caller; 279 279 JSFunction* function = jsCast<JSFunction*>(caller); 280 280 if (function->isHostFunction() || !function->jsExecutable()->isStrictMode()) 281 return JSValue::encode(caller);282 return JSValue::encode(throwTypeError(exec, ASCIILiteral("Function.caller used to retrieve strict caller")));283 } 284 285 EncodedJSValue JSFunction::lengthGetter(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)286 { 287 JSFunction* thisObj = jsCast<JSFunction*>( JSValue::decode(slotBase));281 return caller; 282 return throwTypeError(exec, ASCIILiteral("Function.caller used to retrieve strict caller")); 283 } 284 285 JSValue JSFunction::lengthGetter(ExecState*, JSValue slotBase, PropertyName) 286 { 287 JSFunction* thisObj = jsCast<JSFunction*>(slotBase); 288 288 ASSERT(!thisObj->isHostFunction()); 289 return JSValue::encode(jsNumber(thisObj->jsExecutable()->parameterCount()));290 } 291 292 EncodedJSValue JSFunction::nameGetter(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)293 { 294 JSFunction* thisObj = jsCast<JSFunction*>( JSValue::decode(slotBase));289 return jsNumber(thisObj->jsExecutable()->parameterCount()); 290 } 291 292 JSValue JSFunction::nameGetter(ExecState*, JSValue slotBase, PropertyName) 293 { 294 JSFunction* thisObj = jsCast<JSFunction*>(slotBase); 295 295 ASSERT(!thisObj->isHostFunction()); 296 return JSValue::encode(thisObj->jsExecutable()->nameValue());296 return thisObj->jsExecutable()->nameValue(); 297 297 } 298 298 -
trunk/Source/JavaScriptCore/runtime/JSFunction.h
r160133 r160204 172 172 JS_EXPORT_PRIVATE bool isHostFunctionNonInline() const; 173 173 174 static EncodedJSValue argumentsGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);175 static EncodedJSValue callerGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);176 static EncodedJSValue lengthGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);177 static EncodedJSValue nameGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);174 static JSValue argumentsGetter(ExecState*, JSValue, PropertyName); 175 static JSValue callerGetter(ExecState*, JSValue, PropertyName); 176 static JSValue lengthGetter(ExecState*, JSValue, PropertyName); 177 static JSValue nameGetter(ExecState*, JSValue, PropertyName); 178 178 179 179 WriteBarrier<ExecutableBase> m_executable; -
trunk/Source/JavaScriptCore/runtime/JSObject.h
r160133 r160204 1536 1536 return JSValue::decode(m_data.value); 1537 1537 if (m_propertyType == TypeCustomIndex) 1538 return JSValue::decode(m_data.customIndex.getIndexValue(exec, JSValue::encode(slotBase()), JSValue::encode(m_thisValue), m_data.customIndex.index));1538 return m_data.customIndex.getIndexValue(exec, slotBase(), m_data.customIndex.index); 1539 1539 if (m_propertyType == TypeGetter) 1540 1540 return functionGetter(exec); 1541 return JSValue::decode(m_data.custom.getValue(exec, JSValue::encode(slotBase()), JSValue::encode(m_thisValue), propertyName));1541 return m_data.custom.getValue(exec, slotBase(), propertyName); 1542 1542 } 1543 1543 … … 1547 1547 return JSValue::decode(m_data.value); 1548 1548 if (m_propertyType == TypeCustomIndex) 1549 return JSValue::decode(m_data.customIndex.getIndexValue(exec, JSValue::encode(slotBase()), JSValue::encode(m_thisValue), m_data.customIndex.index));1549 return m_data.customIndex.getIndexValue(exec, slotBase(), m_data.customIndex.index); 1550 1550 if (m_propertyType == TypeGetter) 1551 1551 return functionGetter(exec); 1552 return JSValue::decode(m_data.custom.getValue(exec, JSValue::encode(slotBase()), JSValue::encode(m_thisValue), Identifier::from(exec, propertyName)));1552 return m_data.custom.getValue(exec, slotBase(), Identifier::from(exec, propertyName)); 1553 1553 } 1554 1554 -
trunk/Source/JavaScriptCore/runtime/NumberConstructor.cpp
r160133 r160204 30 30 namespace JSC { 31 31 32 static EncodedJSValue numberConstructorNaNValue(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);33 static EncodedJSValue numberConstructorNegInfinity(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);34 static EncodedJSValue numberConstructorPosInfinity(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);35 static EncodedJSValue numberConstructorMaxValue(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);36 static EncodedJSValue numberConstructorMinValue(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);32 static JSValue numberConstructorNaNValue(ExecState*, JSValue, PropertyName); 33 static JSValue numberConstructorNegInfinity(ExecState*, JSValue, PropertyName); 34 static JSValue numberConstructorPosInfinity(ExecState*, JSValue, PropertyName); 35 static JSValue numberConstructorMaxValue(ExecState*, JSValue, PropertyName); 36 static JSValue numberConstructorMinValue(ExecState*, JSValue, PropertyName); 37 37 38 38 } // namespace JSC … … 83 83 } 84 84 85 static EncodedJSValue numberConstructorNaNValue(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName)85 static JSValue numberConstructorNaNValue(ExecState*, JSValue, PropertyName) 86 86 { 87 return JSValue::encode(jsNaN());87 return jsNaN(); 88 88 } 89 89 90 static EncodedJSValue numberConstructorNegInfinity(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName)90 static JSValue numberConstructorNegInfinity(ExecState*, JSValue, PropertyName) 91 91 { 92 return JSValue::encode(jsNumber(-std::numeric_limits<double>::infinity()));92 return jsNumber(-std::numeric_limits<double>::infinity()); 93 93 } 94 94 95 static EncodedJSValue numberConstructorPosInfinity(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName)95 static JSValue numberConstructorPosInfinity(ExecState*, JSValue, PropertyName) 96 96 { 97 return JSValue::encode(jsNumber(std::numeric_limits<double>::infinity()));97 return jsNumber(std::numeric_limits<double>::infinity()); 98 98 } 99 99 100 static EncodedJSValue numberConstructorMaxValue(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName)100 static JSValue numberConstructorMaxValue(ExecState*, JSValue, PropertyName) 101 101 { 102 return JSValue::encode(jsNumber(1.7976931348623157E+308));102 return jsNumber(1.7976931348623157E+308); 103 103 } 104 104 105 static EncodedJSValue numberConstructorMinValue(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName)105 static JSValue numberConstructorMinValue(ExecState*, JSValue, PropertyName) 106 106 { 107 return JSValue::encode(jsNumber(5E-324));107 return jsNumber(5E-324); 108 108 } 109 109 -
trunk/Source/JavaScriptCore/runtime/PropertySlot.h
r160133 r160204 61 61 } 62 62 63 typedef EncodedJSValue (*GetValueFunc)(ExecState*, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName);64 typedef EncodedJSValue (*GetIndexValueFunc)(ExecState*, EncodedJSValue slotBase, EncodedJSValue thisValue, unsigned);63 typedef JSValue (*GetValueFunc)(ExecState*, JSValue slotBase, PropertyName); 64 typedef JSValue (*GetIndexValueFunc)(ExecState*, JSValue slotBase, unsigned); 65 65 66 66 JSValue getValue(ExecState*, PropertyName) const; … … 227 227 PropertyType m_propertyType; 228 228 PropertyOffset m_offset; 229 constJSValue m_thisValue;229 JSValue m_thisValue; 230 230 JSObject* m_slotBase; 231 231 }; -
trunk/Source/JavaScriptCore/runtime/RegExpConstructor.cpp
r160133 r160204 30 30 namespace JSC { 31 31 32 static EncodedJSValue regExpConstructorInput(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);33 static EncodedJSValue regExpConstructorMultiline(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);34 static EncodedJSValue regExpConstructorLastMatch(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);35 static EncodedJSValue regExpConstructorLastParen(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);36 static EncodedJSValue regExpConstructorLeftContext(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);37 static EncodedJSValue regExpConstructorRightContext(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);38 static EncodedJSValue regExpConstructorDollar1(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);39 static EncodedJSValue regExpConstructorDollar2(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);40 static EncodedJSValue regExpConstructorDollar3(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);41 static EncodedJSValue regExpConstructorDollar4(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);42 static EncodedJSValue regExpConstructorDollar5(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);43 static EncodedJSValue regExpConstructorDollar6(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);44 static EncodedJSValue regExpConstructorDollar7(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);45 static EncodedJSValue regExpConstructorDollar8(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);46 static EncodedJSValue regExpConstructorDollar9(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);32 static JSValue regExpConstructorInput(ExecState*, JSValue, PropertyName); 33 static JSValue regExpConstructorMultiline(ExecState*, JSValue, PropertyName); 34 static JSValue regExpConstructorLastMatch(ExecState*, JSValue, PropertyName); 35 static JSValue regExpConstructorLastParen(ExecState*, JSValue, PropertyName); 36 static JSValue regExpConstructorLeftContext(ExecState*, JSValue, PropertyName); 37 static JSValue regExpConstructorRightContext(ExecState*, JSValue, PropertyName); 38 static JSValue regExpConstructorDollar1(ExecState*, JSValue, PropertyName); 39 static JSValue regExpConstructorDollar2(ExecState*, JSValue, PropertyName); 40 static JSValue regExpConstructorDollar3(ExecState*, JSValue, PropertyName); 41 static JSValue regExpConstructorDollar4(ExecState*, JSValue, PropertyName); 42 static JSValue regExpConstructorDollar5(ExecState*, JSValue, PropertyName); 43 static JSValue regExpConstructorDollar6(ExecState*, JSValue, PropertyName); 44 static JSValue regExpConstructorDollar7(ExecState*, JSValue, PropertyName); 45 static JSValue regExpConstructorDollar8(ExecState*, JSValue, PropertyName); 46 static JSValue regExpConstructorDollar9(ExecState*, JSValue, PropertyName); 47 47 48 48 static void setRegExpConstructorInput(ExecState*, JSObject*, JSValue); … … 159 159 } 160 160 161 static inline RegExpConstructor* asRegExpConstructor(EncodedJSValue value) 162 { 163 return jsCast<RegExpConstructor*>(JSValue::decode(value)); 164 } 165 166 EncodedJSValue regExpConstructorDollar1(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName) 167 { 168 return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 1)); 169 } 170 171 EncodedJSValue regExpConstructorDollar2(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName) 172 { 173 return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 2)); 174 } 175 176 EncodedJSValue regExpConstructorDollar3(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName) 177 { 178 return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 3)); 179 } 180 181 EncodedJSValue regExpConstructorDollar4(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName) 182 { 183 return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 4)); 184 } 185 186 EncodedJSValue regExpConstructorDollar5(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName) 187 { 188 return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 5)); 189 } 190 191 EncodedJSValue regExpConstructorDollar6(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName) 192 { 193 return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 6)); 194 } 195 196 EncodedJSValue regExpConstructorDollar7(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName) 197 { 198 return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 7)); 199 } 200 201 EncodedJSValue regExpConstructorDollar8(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName) 202 { 203 return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 8)); 204 } 205 206 EncodedJSValue regExpConstructorDollar9(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName) 207 { 208 return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 9)); 209 } 210 211 EncodedJSValue regExpConstructorInput(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName) 212 { 213 return JSValue::encode(asRegExpConstructor(slotBase)->input()); 214 } 215 216 EncodedJSValue regExpConstructorMultiline(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName) 217 { 218 return JSValue::encode(jsBoolean(asRegExpConstructor(slotBase)->multiline())); 219 } 220 221 EncodedJSValue regExpConstructorLastMatch(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName) 222 { 223 return JSValue::encode(asRegExpConstructor(slotBase)->getBackref(exec, 0)); 224 } 225 226 EncodedJSValue regExpConstructorLastParen(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName) 227 { 228 return JSValue::encode(asRegExpConstructor(slotBase)->getLastParen(exec)); 229 } 230 231 EncodedJSValue regExpConstructorLeftContext(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName) 232 { 233 return JSValue::encode(asRegExpConstructor(slotBase)->getLeftContext(exec)); 234 } 235 236 EncodedJSValue regExpConstructorRightContext(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName) 237 { 238 return JSValue::encode(asRegExpConstructor(slotBase)->getRightContext(exec)); 161 JSValue regExpConstructorDollar1(ExecState* exec, JSValue slotBase, PropertyName) 162 { 163 return asRegExpConstructor(slotBase)->getBackref(exec, 1); 164 } 165 166 JSValue regExpConstructorDollar2(ExecState* exec, JSValue slotBase, PropertyName) 167 { 168 return asRegExpConstructor(slotBase)->getBackref(exec, 2); 169 } 170 171 JSValue regExpConstructorDollar3(ExecState* exec, JSValue slotBase, PropertyName) 172 { 173 return asRegExpConstructor(slotBase)->getBackref(exec, 3); 174 } 175 176 JSValue regExpConstructorDollar4(ExecState* exec, JSValue slotBase, PropertyName) 177 { 178 return asRegExpConstructor(slotBase)->getBackref(exec, 4); 179 } 180 181 JSValue regExpConstructorDollar5(ExecState* exec, JSValue slotBase, PropertyName) 182 { 183 return asRegExpConstructor(slotBase)->getBackref(exec, 5); 184 } 185 186 JSValue regExpConstructorDollar6(ExecState* exec, JSValue slotBase, PropertyName) 187 { 188 return asRegExpConstructor(slotBase)->getBackref(exec, 6); 189 } 190 191 JSValue regExpConstructorDollar7(ExecState* exec, JSValue slotBase, PropertyName) 192 { 193 return asRegExpConstructor(slotBase)->getBackref(exec, 7); 194 } 195 196 JSValue regExpConstructorDollar8(ExecState* exec, JSValue slotBase, PropertyName) 197 { 198 return asRegExpConstructor(slotBase)->getBackref(exec, 8); 199 } 200 201 JSValue regExpConstructorDollar9(ExecState* exec, JSValue slotBase, PropertyName) 202 { 203 return asRegExpConstructor(slotBase)->getBackref(exec, 9); 204 } 205 206 JSValue regExpConstructorInput(ExecState*, JSValue slotBase, PropertyName) 207 { 208 return asRegExpConstructor(slotBase)->input(); 209 } 210 211 JSValue regExpConstructorMultiline(ExecState*, JSValue slotBase, PropertyName) 212 { 213 return jsBoolean(asRegExpConstructor(slotBase)->multiline()); 214 } 215 216 JSValue regExpConstructorLastMatch(ExecState* exec, JSValue slotBase, PropertyName) 217 { 218 return asRegExpConstructor(slotBase)->getBackref(exec, 0); 219 } 220 221 JSValue regExpConstructorLastParen(ExecState* exec, JSValue slotBase, PropertyName) 222 { 223 return asRegExpConstructor(slotBase)->getLastParen(exec); 224 } 225 226 JSValue regExpConstructorLeftContext(ExecState* exec, JSValue slotBase, PropertyName) 227 { 228 return asRegExpConstructor(slotBase)->getLeftContext(exec); 229 } 230 231 JSValue regExpConstructorRightContext(ExecState* exec, JSValue slotBase, PropertyName) 232 { 233 return asRegExpConstructor(slotBase)->getRightContext(exec); 239 234 } 240 235 -
trunk/Source/JavaScriptCore/runtime/RegExpObject.cpp
r160133 r160204 40 40 namespace JSC { 41 41 42 static EncodedJSValue regExpObjectGlobal(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);43 static EncodedJSValue regExpObjectIgnoreCase(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);44 static EncodedJSValue regExpObjectMultiline(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);45 static EncodedJSValue regExpObjectSource(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);42 static JSValue regExpObjectGlobal(ExecState*, JSValue, PropertyName); 43 static JSValue regExpObjectIgnoreCase(ExecState*, JSValue, PropertyName); 44 static JSValue regExpObjectMultiline(ExecState*, JSValue, PropertyName); 45 static JSValue regExpObjectSource(ExecState*, JSValue, PropertyName); 46 46 47 47 } // namespace JSC … … 156 156 } 157 157 158 static inline RegExpObject* asRegExpObject(EncodedJSValue value) 159 { 160 return jsCast<RegExpObject*>(JSValue::decode(value)); 161 } 162 163 EncodedJSValue regExpObjectGlobal(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName) 164 { 165 return JSValue::encode(jsBoolean(asRegExpObject(slotBase)->regExp()->global())); 166 } 167 168 EncodedJSValue regExpObjectIgnoreCase(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName) 169 { 170 return JSValue::encode(jsBoolean(asRegExpObject(slotBase)->regExp()->ignoreCase())); 158 JSValue regExpObjectGlobal(ExecState*, JSValue slotBase, PropertyName) 159 { 160 return jsBoolean(asRegExpObject(slotBase)->regExp()->global()); 161 } 162 163 JSValue regExpObjectIgnoreCase(ExecState*, JSValue slotBase, PropertyName) 164 { 165 return jsBoolean(asRegExpObject(slotBase)->regExp()->ignoreCase()); 171 166 } 172 167 173 EncodedJSValue regExpObjectMultiline(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)168 JSValue regExpObjectMultiline(ExecState*, JSValue slotBase, PropertyName) 174 169 { 175 return JSValue::encode(jsBoolean(asRegExpObject(slotBase)->regExp()->multiline()));170 return jsBoolean(asRegExpObject(slotBase)->regExp()->multiline()); 176 171 } 177 172 … … 282 277 } 283 278 284 285 286 EncodedJSValue regExpObjectSource(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName) 279 JSValue regExpObjectSource(ExecState* exec, JSValue slotBase, PropertyName) 287 280 { 288 281 String pattern = asRegExpObject(slotBase)->regExp()->pattern(); 289 282 if (pattern.is8Bit()) 290 return JSValue::encode(regExpObjectSourceInternal(exec, pattern, pattern.characters8(), pattern.length()));291 return JSValue::encode(regExpObjectSourceInternal(exec, pattern, pattern.characters16(), pattern.length()));283 return regExpObjectSourceInternal(exec, pattern, pattern.characters8(), pattern.length()); 284 return regExpObjectSourceInternal(exec, pattern, pattern.characters16(), pattern.length()); 292 285 } 293 286 -
trunk/Source/WebCore/ChangeLog
r160203 r160204 1 2013-12-05 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r160133. 4 http://trac.webkit.org/changeset/160133 5 https://bugs.webkit.org/show_bug.cgi?id=125325 6 7 broke bindings tests on all the bots (Requested by thorton on 8 #webkit). 9 10 * bindings/js/JSCSSStyleDeclarationCustom.cpp: 11 (WebCore::cssPropertyGetterPixelOrPosPrefixCallback): 12 (WebCore::cssPropertyGetterCallback): 13 * bindings/js/JSDOMBinding.cpp: 14 (WebCore::objectToStringFunctionGetter): 15 * bindings/js/JSDOMBinding.h: 16 * bindings/js/JSDOMMimeTypeArrayCustom.cpp: 17 (WebCore::JSDOMMimeTypeArray::nameGetter): 18 * bindings/js/JSDOMPluginArrayCustom.cpp: 19 (WebCore::JSDOMPluginArray::nameGetter): 20 * bindings/js/JSDOMPluginCustom.cpp: 21 (WebCore::JSDOMPlugin::nameGetter): 22 * bindings/js/JSDOMStringMapCustom.cpp: 23 (WebCore::JSDOMStringMap::nameGetter): 24 * bindings/js/JSDOMWindowCustom.cpp: 25 (WebCore::nonCachingStaticFunctionGetter): 26 (WebCore::childFrameGetter): 27 (WebCore::indexGetter): 28 (WebCore::namedItemGetter): 29 * bindings/js/JSHTMLAllCollectionCustom.cpp: 30 (WebCore::JSHTMLAllCollection::nameGetter): 31 * bindings/js/JSHTMLCollectionCustom.cpp: 32 (WebCore::JSHTMLCollection::nameGetter): 33 * bindings/js/JSHTMLDocumentCustom.cpp: 34 (WebCore::JSHTMLDocument::nameGetter): 35 * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: 36 (WebCore::JSHTMLFormControlsCollection::nameGetter): 37 * bindings/js/JSHTMLFormElementCustom.cpp: 38 (WebCore::JSHTMLFormElement::nameGetter): 39 * bindings/js/JSHTMLFrameSetElementCustom.cpp: 40 (WebCore::JSHTMLFrameSetElement::nameGetter): 41 * bindings/js/JSHistoryCustom.cpp: 42 (WebCore::nonCachingStaticBackFunctionGetter): 43 (WebCore::nonCachingStaticForwardFunctionGetter): 44 (WebCore::nonCachingStaticGoFunctionGetter): 45 * bindings/js/JSJavaScriptCallFrameCustom.cpp: 46 (WebCore::JSJavaScriptCallFrame::scopeType): 47 * bindings/js/JSLocationCustom.cpp: 48 (WebCore::nonCachingStaticReplaceFunctionGetter): 49 (WebCore::nonCachingStaticReloadFunctionGetter): 50 (WebCore::nonCachingStaticAssignFunctionGetter): 51 * bindings/js/JSNamedNodeMapCustom.cpp: 52 (WebCore::JSNamedNodeMap::nameGetter): 53 * bindings/js/JSNodeListCustom.cpp: 54 (WebCore::JSNodeList::nameGetter): 55 * bindings/js/JSPluginElementFunctions.cpp: 56 (WebCore::pluginElementPropertyGetter): 57 * bindings/js/JSPluginElementFunctions.h: 58 * bindings/js/JSRTCStatsResponseCustom.cpp: 59 (WebCore::JSRTCStatsResponse::nameGetter): 60 * bindings/js/JSStorageCustom.cpp: 61 (WebCore::JSStorage::nameGetter): 62 * bindings/js/JSStyleSheetListCustom.cpp: 63 (WebCore::JSStyleSheetList::nameGetter): 64 * bindings/scripts/CodeGeneratorJS.pm: 65 (GenerateHeader): 66 (GenerateImplementation): 67 (GenerateParametersCheck): 68 * bridge/runtime_array.cpp: 69 (JSC::RuntimeArray::lengthGetter): 70 (JSC::RuntimeArray::indexGetter): 71 * bridge/runtime_array.h: 72 * bridge/runtime_method.cpp: 73 (JSC::RuntimeMethod::lengthGetter): 74 * bridge/runtime_method.h: 75 * bridge/runtime_object.cpp: 76 (JSC::Bindings::RuntimeObject::fallbackObjectGetter): 77 (JSC::Bindings::RuntimeObject::fieldGetter): 78 (JSC::Bindings::RuntimeObject::methodGetter): 79 * bridge/runtime_object.h: 80 1 81 2013-12-05 Seokju Kwon <seokju@webkit.org> 2 82 -
trunk/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp
r160133 r160204 304 304 } 305 305 306 static EncodedJSValue cssPropertyGetterPixelOrPosPrefixCallback(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, unsigned propertyID)307 { 308 return JSValue::encode(cssPropertyGetterPixelOrPosPrefix(exec, jsCast<JSCSSStyleDeclaration*>(JSValue::decode(slotBase)), propertyID));306 static JSValue cssPropertyGetterPixelOrPosPrefixCallback(ExecState* exec, JSValue slotBase, unsigned propertyID) 307 { 308 return cssPropertyGetterPixelOrPosPrefix(exec, jsCast<JSCSSStyleDeclaration*>(asObject(slotBase)), propertyID); 309 309 } 310 310 … … 318 318 } 319 319 320 static EncodedJSValue cssPropertyGetterCallback(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, unsigned propertyID)321 { 322 return JSValue::encode(cssPropertyGetter(exec, jsCast<JSCSSStyleDeclaration*>(JSValue::decode(slotBase)), propertyID));320 static JSValue cssPropertyGetterCallback(ExecState* exec, JSValue slotBase, unsigned propertyID) 321 { 322 return cssPropertyGetter(exec, jsCast<JSCSSStyleDeclaration*>(asObject(slotBase)), propertyID); 323 323 } 324 324 -
trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp
r160133 r160204 272 272 } 273 273 274 EncodedJSValue objectToStringFunctionGetter(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName propertyName)275 { 276 return JS Value::encode(JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 0, propertyName.publicName(), objectProtoFuncToString));274 JSValue objectToStringFunctionGetter(ExecState* exec, JSValue, PropertyName propertyName) 275 { 276 return JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 0, propertyName.publicName(), objectProtoFuncToString); 277 277 } 278 278 -
trunk/Source/WebCore/bindings/js/JSDOMBinding.h
r160133 r160204 573 573 574 574 void printErrorMessageForFrame(Frame*, const String& message); 575 JSC:: EncodedJSValue objectToStringFunctionGetter(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);575 JSC::JSValue objectToStringFunctionGetter(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 576 576 577 577 inline JSC::JSValue jsStringWithCache(JSC::ExecState* exec, const String& s) -
trunk/Source/WebCore/bindings/js/JSDOMMimeTypeArrayCustom.cpp
r160133 r160204 34 34 } 35 35 36 EncodedJSValue JSDOMMimeTypeArray::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)36 JSValue JSDOMMimeTypeArray::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName) 37 37 { 38 JSDOMMimeTypeArray* thisObj = jsDynamicCast<JSDOMMimeTypeArray*>(JSValue::decode(slotBase)); 39 if (!thisObj) 40 return throwVMTypeError(exec); 41 return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName)))); 38 JSDOMMimeTypeArray* thisObj = jsCast<JSDOMMimeTypeArray*>(asObject(slotBase)); 39 return toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName))); 42 40 } 43 41 -
trunk/Source/WebCore/bindings/js/JSDOMPluginArrayCustom.cpp
r160133 r160204 34 34 } 35 35 36 EncodedJSValue JSDOMPluginArray::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)36 JSValue JSDOMPluginArray::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName) 37 37 { 38 JSDOMPluginArray* thisObj = jsCast<JSDOMPluginArray*>( JSValue::decode(slotBase));39 return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName))));38 JSDOMPluginArray* thisObj = jsCast<JSDOMPluginArray*>(asObject(slotBase)); 39 return toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName))); 40 40 } 41 41 -
trunk/Source/WebCore/bindings/js/JSDOMPluginCustom.cpp
r160133 r160204 33 33 } 34 34 35 EncodedJSValue JSDOMPlugin::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)35 JSValue JSDOMPlugin::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName) 36 36 { 37 JSDOMPlugin* thisObj = jsCast<JSDOMPlugin*>( JSValue::decode(slotBase));38 return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName))));37 JSDOMPlugin* thisObj = jsCast<JSDOMPlugin*>(asObject(slotBase)); 38 return toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName))); 39 39 } 40 40 -
trunk/Source/WebCore/bindings/js/JSDOMStringMapCustom.cpp
r160133 r160204 41 41 } 42 42 43 EncodedJSValue JSDOMStringMap::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)43 JSValue JSDOMStringMap::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName) 44 44 { 45 JSDOMStringMap* thisObj = jsCast<JSDOMStringMap*>( JSValue::decode(slotBase));46 return JSValue::encode(jsStringWithCache(exec, thisObj->impl().item(propertyNameToAtomicString(propertyName))));45 JSDOMStringMap* thisObj = jsCast<JSDOMStringMap*>(asObject(slotBase)); 46 return jsStringWithCache(exec, thisObj->impl().item(propertyNameToAtomicString(propertyName))); 47 47 } 48 48 -
trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
r160133 r160204 68 68 69 69 template<NativeFunction nativeFunction, int length> 70 EncodedJSValue nonCachingStaticFunctionGetter(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName propertyName)71 { 72 return JS Value::encode(JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), length, propertyName.publicName(), nativeFunction));73 } 74 75 static EncodedJSValue childFrameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)76 { 77 return JSValue::encode(toJS(exec, jsCast<JSDOMWindow*>(JSValue::decode(slotBase))->impl().frame()->tree().scopedChild(propertyNameToAtomicString(propertyName))->document()->domWindow()));78 } 79 80 static EncodedJSValue indexGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, unsigned index)81 { 82 return JSValue::encode(toJS(exec, jsCast<JSDOMWindow*>(JSValue::decode(slotBase))->impl().frame()->tree().scopedChild(index)->document()->domWindow()));83 } 84 85 static EncodedJSValue namedItemGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)86 { 87 JSDOMWindowBase* thisObj = jsCast<JSDOMWindow*>( JSValue::decode(slotBase));70 JSValue nonCachingStaticFunctionGetter(ExecState* exec, JSValue, PropertyName propertyName) 71 { 72 return JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), length, propertyName.publicName(), nativeFunction); 73 } 74 75 static JSValue childFrameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName) 76 { 77 return toJS(exec, jsCast<JSDOMWindow*>(asObject(slotBase))->impl().frame()->tree().scopedChild(propertyNameToAtomicString(propertyName))->document()->domWindow()); 78 } 79 80 static JSValue indexGetter(ExecState* exec, JSValue slotBase, unsigned index) 81 { 82 return toJS(exec, jsCast<JSDOMWindow*>(asObject(slotBase))->impl().frame()->tree().scopedChild(index)->document()->domWindow()); 83 } 84 85 static JSValue namedItemGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName) 86 { 87 JSDOMWindowBase* thisObj = jsCast<JSDOMWindow*>(asObject(slotBase)); 88 88 Document* document = thisObj->impl().frame()->document(); 89 89 … … 94 94 AtomicStringImpl* atomicPropertyName = findAtomicString(propertyName); 95 95 if (!atomicPropertyName || !toHTMLDocument(document)->hasWindowNamedItem(*atomicPropertyName)) 96 return JSValue::encode(jsUndefined());96 return jsUndefined(); 97 97 98 98 if (UNLIKELY(toHTMLDocument(document)->windowNamedItemContainsMultipleElements(*atomicPropertyName))) { 99 99 RefPtr<HTMLCollection> collection = document->windowNamedItems(atomicPropertyName); 100 100 ASSERT(collection->length() > 1); 101 return JSValue::encode(toJS(exec, thisObj->globalObject(), WTF::getPtr(collection)));102 } 103 104 return JSValue::encode(toJS(exec, thisObj->globalObject(), toHTMLDocument(document)->windowNamedItem(*atomicPropertyName)));101 return toJS(exec, thisObj->globalObject(), WTF::getPtr(collection)); 102 } 103 104 return toJS(exec, thisObj->globalObject(), toHTMLDocument(document)->windowNamedItem(*atomicPropertyName)); 105 105 } 106 106 -
trunk/Source/WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp
r160133 r160204 101 101 } 102 102 103 EncodedJSValue JSHTMLAllCollection::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)103 JSValue JSHTMLAllCollection::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName) 104 104 { 105 JSHTMLAllCollection* thisObj = jsCast<JSHTMLAllCollection*>( JSValue::decode(slotBase));106 return JSValue::encode(getNamedItems(exec, thisObj, propertyName));105 JSHTMLAllCollection* thisObj = jsCast<JSHTMLAllCollection*>(asObject(slotBase)); 106 return getNamedItems(exec, thisObj, propertyName); 107 107 } 108 108 -
trunk/Source/WebCore/bindings/js/JSHTMLCollectionCustom.cpp
r160133 r160204 46 46 } 47 47 48 EncodedJSValue JSHTMLCollection::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)48 JSValue JSHTMLCollection::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName) 49 49 { 50 JSHTMLCollection* collection = jsCast<JSHTMLCollection*>( JSValue::decode(slotBase));50 JSHTMLCollection* collection = jsCast<JSHTMLCollection*>(asObject(slotBase)); 51 51 const AtomicString& name = propertyNameToAtomicString(propertyName); 52 return JSValue::encode(toJS(exec, collection->globalObject(), collection->impl().namedItem(name)));52 return toJS(exec, collection->globalObject(), collection->impl().namedItem(name)); 53 53 } 54 54 -
trunk/Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp
r160133 r160204 58 58 } 59 59 60 EncodedJSValue JSHTMLDocument::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)60 JSValue JSHTMLDocument::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName) 61 61 { 62 JSHTMLDocument* thisObj = jsCast<JSHTMLDocument*>( JSValue::decode(slotBase));62 JSHTMLDocument* thisObj = jsCast<JSHTMLDocument*>(asObject(slotBase)); 63 63 HTMLDocument& document = thisObj->impl(); 64 64 65 65 AtomicStringImpl* atomicPropertyName = findAtomicString(propertyName); 66 66 if (!atomicPropertyName || !document.hasDocumentNamedItem(*atomicPropertyName)) 67 return JSValue::encode(jsUndefined());67 return jsUndefined(); 68 68 69 69 if (UNLIKELY(document.documentNamedItemContainsMultipleElements(*atomicPropertyName))) { 70 70 RefPtr<HTMLCollection> collection = document.documentNamedItems(atomicPropertyName); 71 71 ASSERT(collection->length() > 1); 72 return JSValue::encode(toJS(exec, thisObj->globalObject(), WTF::getPtr(collection)));72 return toJS(exec, thisObj->globalObject(), WTF::getPtr(collection)); 73 73 } 74 74 … … 76 76 if (UNLIKELY(element->hasTagName(iframeTag))) { 77 77 if (Frame* frame = toHTMLIFrameElement(element)->contentFrame()) 78 return JSValue::encode(toJS(exec, frame));78 return toJS(exec, frame); 79 79 } 80 80 81 return JSValue::encode(toJS(exec, thisObj->globalObject(), element));81 return toJS(exec, thisObj->globalObject(), element); 82 82 } 83 83 -
trunk/Source/WebCore/bindings/js/JSHTMLFormControlsCollectionCustom.cpp
r160133 r160204 58 58 } 59 59 60 EncodedJSValue JSHTMLFormControlsCollection::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)60 JSValue JSHTMLFormControlsCollection::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName) 61 61 { 62 JSHTMLFormControlsCollection* thisObj = jsCast<JSHTMLFormControlsCollection*>( JSValue::decode(slotBase));63 return JSValue::encode(getNamedItems(exec, thisObj, propertyName));62 JSHTMLFormControlsCollection* thisObj = jsCast<JSHTMLFormControlsCollection*>(asObject(slotBase)); 63 return getNamedItems(exec, thisObj, propertyName); 64 64 } 65 65 -
trunk/Source/WebCore/bindings/js/JSHTMLFormElementCustom.cpp
r160133 r160204 43 43 } 44 44 45 EncodedJSValue JSHTMLFormElement::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)45 JSValue JSHTMLFormElement::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName) 46 46 { 47 JSHTMLFormElement* jsForm = jsCast<JSHTMLFormElement*>( JSValue::decode(slotBase));47 JSHTMLFormElement* jsForm = jsCast<JSHTMLFormElement*>(asObject(slotBase)); 48 48 HTMLFormElement& form = jsForm->impl(); 49 49 … … 52 52 53 53 if (namedItems.isEmpty()) 54 return JSValue::encode(jsUndefined());54 return jsUndefined(); 55 55 if (namedItems.size() == 1) 56 return JSValue::encode(toJS(exec, jsForm->globalObject(), &namedItems[0].get()));56 return toJS(exec, jsForm->globalObject(), &namedItems[0].get()); 57 57 58 58 // FIXME: HTML5 specifies that this should be a RadioNodeList. 59 return JSValue::encode(toJS(exec, jsForm->globalObject(), StaticElementList::adopt(namedItems).get()));59 return toJS(exec, jsForm->globalObject(), StaticElementList::adopt(namedItems).get()); 60 60 } 61 61 -
trunk/Source/WebCore/bindings/js/JSHTMLFrameSetElementCustom.cpp
r160133 r160204 48 48 } 49 49 50 EncodedJSValue JSHTMLFrameSetElement::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)50 JSValue JSHTMLFrameSetElement::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName) 51 51 { 52 HTMLElement& element = jsCast<JSHTMLElement*>( JSValue::decode(slotBase))->impl();52 HTMLElement& element = jsCast<JSHTMLElement*>(asObject(slotBase))->impl(); 53 53 Node* frameElement = element.children()->namedItem(propertyNameToAtomicString(propertyName)); 54 54 if (Document* document = toHTMLFrameElement(frameElement)->contentDocument()) { 55 55 if (JSDOMWindowShell* window = toJSDOMWindowShell(document->frame(), currentWorld(exec))) 56 return JSValue::encode(window);56 return window; 57 57 } 58 return JSValue::encode(jsUndefined());58 return jsUndefined(); 59 59 } 60 60 -
trunk/Source/WebCore/bindings/js/JSHistoryCustom.cpp
r160133 r160204 39 39 namespace WebCore { 40 40 41 static EncodedJSValue nonCachingStaticBackFunctionGetter(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName propertyName)41 static JSValue nonCachingStaticBackFunctionGetter(ExecState* exec, JSValue, PropertyName propertyName) 42 42 { 43 return JS Value::encode(JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 0, propertyName.publicName(), jsHistoryPrototypeFunctionBack));43 return JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 0, propertyName.publicName(), jsHistoryPrototypeFunctionBack); 44 44 } 45 45 46 static EncodedJSValue nonCachingStaticForwardFunctionGetter(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName propertyName)46 static JSValue nonCachingStaticForwardFunctionGetter(ExecState* exec, JSValue, PropertyName propertyName) 47 47 { 48 return JS Value::encode(JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 0, propertyName.publicName(), jsHistoryPrototypeFunctionForward));48 return JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 0, propertyName.publicName(), jsHistoryPrototypeFunctionForward); 49 49 } 50 50 51 static EncodedJSValue nonCachingStaticGoFunctionGetter(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName propertyName)51 static JSValue nonCachingStaticGoFunctionGetter(ExecState* exec, JSValue, PropertyName propertyName) 52 52 { 53 return JS Value::encode(JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 1, propertyName.publicName(), jsHistoryPrototypeFunctionGo));53 return JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 1, propertyName.publicName(), jsHistoryPrototypeFunctionGo); 54 54 } 55 55 -
trunk/Source/WebCore/bindings/js/JSJavaScriptCallFrameCustom.cpp
r160133 r160204 107 107 // First activation object is local scope, each successive activation object is closure. 108 108 if (!index) 109 return JSValue::decode(jsJavaScriptCallFrameLOCAL_SCOPE(exec, EncodedJSValue(), EncodedJSValue(), Identifier()));109 return jsJavaScriptCallFrameLOCAL_SCOPE(exec, JSValue(), Identifier()); 110 110 foundLocalScope = true; 111 111 } else if (!index) 112 return JSValue::decode(jsJavaScriptCallFrameCLOSURE_SCOPE(exec, EncodedJSValue(), EncodedJSValue(), Identifier()));112 return jsJavaScriptCallFrameCLOSURE_SCOPE(exec, JSValue(), Identifier()); 113 113 } 114 114 … … 116 116 // Last in the chain is global scope. 117 117 if (++iter == end) 118 return JSValue::decode(jsJavaScriptCallFrameGLOBAL_SCOPE(exec, EncodedJSValue(), EncodedJSValue(), Identifier()));119 return JSValue::decode(jsJavaScriptCallFrameWITH_SCOPE(exec, EncodedJSValue(), EncodedJSValue(), Identifier()));118 return jsJavaScriptCallFrameGLOBAL_SCOPE(exec, JSValue(), Identifier()); 119 return jsJavaScriptCallFrameWITH_SCOPE(exec, JSValue(), Identifier()); 120 120 } 121 121 -
trunk/Source/WebCore/bindings/js/JSLocationCustom.cpp
r160133 r160204 31 31 namespace WebCore { 32 32 33 static EncodedJSValue nonCachingStaticReplaceFunctionGetter(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName propertyName)34 { 35 return JS Value::encode(JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 1, propertyName.publicName(), jsLocationPrototypeFunctionReplace));36 } 37 38 static EncodedJSValue nonCachingStaticReloadFunctionGetter(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName propertyName)39 { 40 return JS Value::encode(JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 0, propertyName.publicName(), jsLocationPrototypeFunctionReload));41 } 42 43 static EncodedJSValue nonCachingStaticAssignFunctionGetter(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName propertyName)44 { 45 return JS Value::encode(JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 1, propertyName.publicName(), jsLocationPrototypeFunctionAssign));33 static JSValue nonCachingStaticReplaceFunctionGetter(ExecState* exec, JSValue, PropertyName propertyName) 34 { 35 return JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 1, propertyName.publicName(), jsLocationPrototypeFunctionReplace); 36 } 37 38 static JSValue nonCachingStaticReloadFunctionGetter(ExecState* exec, JSValue, PropertyName propertyName) 39 { 40 return JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 0, propertyName.publicName(), jsLocationPrototypeFunctionReload); 41 } 42 43 static JSValue nonCachingStaticAssignFunctionGetter(ExecState* exec, JSValue, PropertyName propertyName) 44 { 45 return JSFunction::create(exec->vm(), exec->lexicalGlobalObject(), 1, propertyName.publicName(), jsLocationPrototypeFunctionAssign); 46 46 } 47 47 -
trunk/Source/WebCore/bindings/js/JSNamedNodeMapCustom.cpp
r160133 r160204 41 41 } 42 42 43 EncodedJSValue JSNamedNodeMap::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)43 JSValue JSNamedNodeMap::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName) 44 44 { 45 JSNamedNodeMap* thisObj = jsCast<JSNamedNodeMap*>( JSValue::decode(slotBase));46 return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().getNamedItem(propertyNameToAtomicString(propertyName))));45 JSNamedNodeMap* thisObj = jsCast<JSNamedNodeMap*>(asObject(slotBase)); 46 return toJS(exec, thisObj->globalObject(), thisObj->impl().getNamedItem(propertyNameToAtomicString(propertyName))); 47 47 } 48 48 -
trunk/Source/WebCore/bindings/js/JSNodeListCustom.cpp
r160133 r160204 57 57 } 58 58 59 EncodedJSValue JSNodeList::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)59 JSValue JSNodeList::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName) 60 60 { 61 JSNodeList* thisObj = jsCast<JSNodeList*>( JSValue::decode(slotBase));62 return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName))));61 JSNodeList* thisObj = jsCast<JSNodeList*>(asObject(slotBase)); 62 return toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName))); 63 63 } 64 64 -
trunk/Source/WebCore/bindings/js/JSPluginElementFunctions.cpp
r160133 r160204 101 101 } 102 102 103 EncodedJSValue pluginElementPropertyGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)103 JSValue pluginElementPropertyGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName) 104 104 { 105 JSHTMLElement* element = jsCast<JSHTMLElement*>( JSValue::decode(slotBase));105 JSHTMLElement* element = jsCast<JSHTMLElement*>(asObject(slotBase)); 106 106 JSObject* scriptObject = pluginScriptObject(exec, element); 107 107 if (!scriptObject) 108 return JSValue::encode(jsUndefined());108 return jsUndefined(); 109 109 110 return JSValue::encode(scriptObject->get(exec, propertyName));110 return scriptObject->get(exec, propertyName); 111 111 } 112 112 -
trunk/Source/WebCore/bindings/js/JSPluginElementFunctions.h
r160133 r160204 39 39 JSC::JSObject* pluginScriptObject(JSC::ExecState*, JSHTMLElement*); 40 40 41 JSC:: EncodedJSValue pluginElementPropertyGetter(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);41 JSC::JSValue pluginElementPropertyGetter(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 42 42 bool pluginElementCustomGetOwnPropertySlot(JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&, JSHTMLElement*); 43 43 bool pluginElementCustomPut(JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSHTMLElement*, JSC::PutPropertySlot&); -
trunk/Source/WebCore/bindings/js/JSRTCStatsResponseCustom.cpp
r160133 r160204 41 41 } 42 42 43 EncodedJSValue JSRTCStatsResponse::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)43 JSValue JSRTCStatsResponse::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName) 44 44 { 45 JSRTCStatsResponse* thisObj = jsCast<JSRTCStatsResponse*>( JSValue::decode(slotBase));46 return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName))));45 JSRTCStatsResponse* thisObj = jsCast<JSRTCStatsResponse*>(asObject(slotBase)); 46 return toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName))); 47 47 } 48 48 -
trunk/Source/WebCore/bindings/js/JSStorageCustom.cpp
r160133 r160204 43 43 } 44 44 45 EncodedJSValue JSStorage::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)45 JSValue JSStorage::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName) 46 46 { 47 JSStorage* thisObj = jsCast<JSStorage*>( JSValue::decode(slotBase));47 JSStorage* thisObj = jsCast<JSStorage*>(asObject(slotBase)); 48 48 49 JSValue prototype = asObject( JSValue::decode(slotBase))->prototype();49 JSValue prototype = asObject(slotBase)->prototype(); 50 50 if (prototype.isObject() && asObject(prototype)->hasProperty(exec, propertyName)) 51 return JSValue::encode(asObject(prototype)->get(exec, propertyName));51 return asObject(prototype)->get(exec, propertyName); 52 52 53 53 ExceptionCode ec = 0; 54 54 JSValue result = jsStringOrNull(exec, thisObj->impl().getItem(propertyNameToString(propertyName), ec)); 55 55 setDOMException(exec, ec); 56 return JSValue::encode(result);56 return result; 57 57 } 58 58 -
trunk/Source/WebCore/bindings/js/JSStyleSheetListCustom.cpp
r160133 r160204 41 41 } 42 42 43 EncodedJSValue JSStyleSheetList::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)43 JSValue JSStyleSheetList::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName) 44 44 { 45 JSStyleSheetList* thisObj = jsCast<JSStyleSheetList*>( JSValue::decode(slotBase));45 JSStyleSheetList* thisObj = jsCast<JSStyleSheetList*>(asObject(slotBase)); 46 46 HTMLStyleElement* element = thisObj->impl().getNamedItem(propertyNameToString(propertyName)); 47 47 ASSERT(element); 48 return JSValue::encode(toJS(exec, thisObj->globalObject(), element->sheet()));48 return toJS(exec, thisObj->globalObject(), element->sheet()); 49 49 } 50 50 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r160133 r160204 894 894 push(@headerContent, " JSC::JSValue getByIndex(JSC::ExecState*, unsigned index);\n"); 895 895 } else { 896 push(@headerContent, " static JSC:: EncodedJSValue indexGetter(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, unsigned);\n");896 push(@headerContent, " static JSC::JSValue indexGetter(JSC::ExecState*, JSC::JSValue, unsigned);\n"); 897 897 } 898 898 } … … 906 906 push(@headerContent, "private:\n"); 907 907 push(@headerContent, " static bool canGetItemsForName(JSC::ExecState*, $interfaceName*, JSC::PropertyName);\n"); 908 push(@headerContent, " static JSC:: EncodedJSValue nameGetter(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);\n");908 push(@headerContent, " static JSC::JSValue nameGetter(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);\n"); 909 909 } 910 910 … … 1042 1042 push(@headerContent, "#if ${conditionalString}\n") if $conditionalString; 1043 1043 my $getter = GetAttributeGetterName($interfaceName, $className, $attribute); 1044 push(@headerContent, "JSC:: EncodedJSValue ${getter}(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);\n");1044 push(@headerContent, "JSC::JSValue ${getter}(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);\n"); 1045 1045 if (!IsReadonly($attribute)) { 1046 1046 my $setter = GetAttributeSetterName($interfaceName, $className, $attribute); … … 1052 1052 if (!$interface->extendedAttributes->{"NoInterfaceObject"}) { 1053 1053 my $getter = "js" . $interfaceName . "Constructor"; 1054 push(@headerContent, "JSC:: EncodedJSValue ${getter}(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);\n");1054 push(@headerContent, "JSC::JSValue ${getter}(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);\n"); 1055 1055 } 1056 1056 … … 1067 1067 push(@headerContent, "#if ${conditionalString}\n") if $conditionalString; 1068 1068 my $getter = "js" . $interfaceName . $codeGenerator->WK_ucfirst($constant->name); 1069 push(@headerContent, "JSC:: EncodedJSValue ${getter}(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);\n");1069 push(@headerContent, "JSC::JSValue ${getter}(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);\n"); 1070 1070 push(@headerContent, "#endif\n") if $conditionalString; 1071 1071 } … … 1876 1876 push(@implContent, "#if ${attributeConditionalString}\n") if $attributeConditionalString; 1877 1877 1878 push(@implContent, " EncodedJSValue ${getFunctionName}(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)\n");1878 push(@implContent, "JSValue ${getFunctionName}(ExecState* exec, JSValue slotBase, PropertyName)\n"); 1879 1879 push(@implContent, "{\n"); 1880 1880 1881 1881 if (!$attribute->isStatic || $attribute->signature->type =~ /Constructor$/) { 1882 push(@implContent, " ${className}* castedThis = js DynamicCast<$className*>(JSValue::decode(slotBase));\n");1882 push(@implContent, " ${className}* castedThis = jsCast<$className*>(asObject(slotBase));\n"); 1883 1883 } else { 1884 1884 push(@implContent, " UNUSED_PARAM(slotBase);\n"); … … 1891 1891 my $enable_function = GetRuntimeEnableFunctionName($attribute->signature); 1892 1892 push(@implContent, " if (!${enable_function}())\n"); 1893 push(@implContent, " return JSValue::encode(jsUndefined());\n");1893 push(@implContent, " return jsUndefined();\n"); 1894 1894 } elsif ($attribute->signature->extendedAttributes->{"EnabledBySetting"}) { 1895 1895 AddToImplIncludes("Frame.h"); … … 1897 1897 my $enable_function = ToMethodName($attribute->signature->extendedAttributes->{"EnabledBySetting"}) . "Enabled"; 1898 1898 push(@implContent, " if (!castedThis->impl().frame())\n"); 1899 push(@implContent, " return JSValue::encode(jsUndefined());\n");1899 push(@implContent, " return jsUndefined();\n"); 1900 1900 push(@implContent, " Settings& settings = castedThis->impl().frame()->settings();\n"); 1901 1901 push(@implContent, " if (!settings.$enable_function())\n"); 1902 push(@implContent, " return JSValue::encode(jsUndefined());\n");1902 push(@implContent, " return jsUndefined();\n"); 1903 1903 } 1904 1904 } … … 1912 1912 !$attribute->signature->extendedAttributes->{"DoNotCheckSecurityOnGetter"}) { 1913 1913 push(@implContent, " if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, castedThis->impl()))\n"); 1914 push(@implContent, " return JSValue::encode(jsUndefined());\n");1914 push(@implContent, " return jsUndefined();\n"); 1915 1915 } 1916 1916 1917 1917 if (HasCustomGetter($attribute->signature->extendedAttributes)) { 1918 push(@implContent, " return JSValue::encode(castedThis->$implGetterFunctionName(exec));\n");1918 push(@implContent, " return castedThis->$implGetterFunctionName(exec);\n"); 1919 1919 } elsif ($attribute->signature->extendedAttributes->{"CheckSecurityForNode"}) { 1920 1920 $implIncludes{"JSDOMBinding.h"} = 1; 1921 1921 push(@implContent, " $interfaceName& impl = castedThis->impl();\n"); 1922 push(@implContent, " return JSValue::encode(shouldAllowAccessToNode(exec, impl." . $attribute->signature->name . "()) ? " . NativeToJSValue($attribute->signature, 0, $interfaceName, "impl.$implGetterFunctionName()", "castedThis") . " : jsNull());\n");1922 push(@implContent, " return shouldAllowAccessToNode(exec, impl." . $attribute->signature->name . "()) ? " . NativeToJSValue($attribute->signature, 0, $interfaceName, "impl.$implGetterFunctionName()", "castedThis") . " : jsNull();\n"); 1923 1923 } elsif ($type eq "EventListener") { 1924 1924 $implIncludes{"EventListener.h"} = 1; … … 1932 1932 push(@implContent, " if (JSObject* jsFunction = jsListener->jsFunction(impl.scriptExecutionContext()))\n"); 1933 1933 } 1934 push(@implContent, " return JSValue::encode(jsFunction);\n");1934 push(@implContent, " return jsFunction;\n"); 1935 1935 push(@implContent, " }\n"); 1936 1936 push(@implContent, " }\n"); 1937 push(@implContent, " return JSValue::encode(jsNull());\n");1937 push(@implContent, " return jsNull();\n"); 1938 1938 } elsif ($attribute->signature->type =~ /Constructor$/) { 1939 1939 my $constructorType = $attribute->signature->type; … … 1944 1944 my $named = ($constructorType =~ /Named$/) ? "Named" : ""; 1945 1945 $constructorType =~ s/Named$//; 1946 push(@implContent, " return JS Value::encode(JS" . $constructorType . "::get${named}Constructor(exec->vm(), castedThis));\n");1946 push(@implContent, " return JS" . $constructorType . "::get${named}Constructor(exec->vm(), castedThis);\n"); 1947 1947 } else { 1948 1948 AddToImplIncludes("JS" . $constructorType . ".h", $attribute->signature->extendedAttributes->{"Conditional"}); 1949 push(@implContent, " return JS Value::encode(JS" . $constructorType . "::getConstructor(exec->vm(), castedThis->globalObject()));\n");1949 push(@implContent, " return JS" . $constructorType . "::getConstructor(exec->vm(), castedThis->globalObject());\n"); 1950 1950 } 1951 1951 } elsif (!$attribute->signature->extendedAttributes->{"GetterRaisesException"}) { … … 1958 1958 $currentCachedAttribute++; 1959 1959 push(@implContent, " if (JSValue cachedValue = castedThis->m_" . $attribute->signature->name . ".get())\n"); 1960 push(@implContent, " return JSValue::encode(cachedValue);\n");1960 push(@implContent, " return cachedValue;\n"); 1961 1961 } 1962 1962 1963 my @callWithArgs = GenerateCallWith($attribute->signature->extendedAttributes->{"CallWith"}, \@implContent, " JSValue::encode(jsUndefined())");1963 my @callWithArgs = GenerateCallWith($attribute->signature->extendedAttributes->{"CallWith"}, \@implContent, "jsUndefined()"); 1964 1964 1965 1965 if ($svgListPropertyType) { … … 1999 1999 if ($isNullable) { 2000 2000 push(@implContent, " if (isNull)\n"); 2001 push(@implContent, " return JSValue::encode(jsNull());\n");2001 push(@implContent, " return jsNull();\n"); 2002 2002 } 2003 2003 } 2004 2004 2005 2005 push(@implContent, " castedThis->m_" . $attribute->signature->name . ".set(exec->vm(), castedThis, result);\n") if ($attribute->signature->extendedAttributes->{"CachedAttribute"}); 2006 push(@implContent, " return JSValue::encode(result);\n");2006 push(@implContent, " return result;\n"); 2007 2007 2008 2008 } else { … … 2015 2015 } 2016 2016 2017 unshift(@arguments, GenerateCallWith($attribute->signature->extendedAttributes->{"CallWith"}, \@implContent, " JSValue::encode(jsUndefined())"));2017 unshift(@arguments, GenerateCallWith($attribute->signature->extendedAttributes->{"CallWith"}, \@implContent, "jsUndefined()")); 2018 2018 2019 2019 if ($svgPropertyOrListPropertyType) { … … 2027 2027 if ($isNullable) { 2028 2028 push(@implContent, " if (isNull)\n"); 2029 push(@implContent, " return JSValue::encode(jsNull());\n");2029 push(@implContent, " return jsNull();\n"); 2030 2030 } 2031 2031 2032 2032 push(@implContent, " setDOMException(exec, ec);\n"); 2033 push(@implContent, " return JSValue::encode(result);\n");2033 push(@implContent, " return result;\n"); 2034 2034 } 2035 2035 … … 2044 2044 my $constructorFunctionName = "js" . $interfaceName . "Constructor"; 2045 2045 2046 push(@implContent, " EncodedJSValue ${constructorFunctionName}(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)\n");2046 push(@implContent, "JSValue ${constructorFunctionName}(ExecState* exec, JSValue slotBase, PropertyName)\n"); 2047 2047 push(@implContent, "{\n"); 2048 push(@implContent, " ${className}* domObject = js DynamicCast<$className*>(JSValue::decode(slotBase));\n");2048 push(@implContent, " ${className}* domObject = jsCast<$className*>(asObject(slotBase));\n"); 2049 2049 2050 2050 if ($interface->extendedAttributes->{"CheckSecurity"}) { 2051 2051 push(@implContent, " if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, domObject->impl()))\n"); 2052 push(@implContent, " return JSValue::encode(jsUndefined());\n");2052 push(@implContent, " return jsUndefined();\n"); 2053 2053 } 2054 2054 2055 push(@implContent, " return JSValue::encode(${className}::getConstructor(exec->vm(), domObject->globalObject()));\n");2055 push(@implContent, " return ${className}::getConstructor(exec->vm(), domObject->globalObject());\n"); 2056 2056 push(@implContent, "}\n\n"); 2057 2057 } … … 2385 2385 } else { 2386 2386 push(@implContent, " JSValue thisValue = exec->hostThisValue();\n"); 2387 push(@implContent, " $className* castedThis = jsDynamicCast<$className*>(thisValue);\n"); 2388 push(@implContent, " if (!castedThis)\n"); 2387 push(@implContent, " if (!thisValue.inherits(${className}::info()))\n"); 2389 2388 push(@implContent, " return throwVMTypeError(exec);\n"); 2389 push(@implContent, " $className* castedThis = jsCast<$className*>(asObject(thisValue));\n"); 2390 2390 } 2391 2391 … … 2485 2485 2486 2486 # FIXME: this casts into int to match our previous behavior which turned 0xFFFFFFFF in -1 for NodeFilter.SHOW_ALL 2487 push(@implContent, " EncodedJSValue ${getter}(ExecState* exec, EncodedJSValue, EncodedJSValue, PropertyName)\n");2487 push(@implContent, "JSValue ${getter}(ExecState* exec, JSValue, PropertyName)\n"); 2488 2488 push(@implContent, "{\n"); 2489 2489 if ($constant->type eq "DOMString") { 2490 push(@implContent, " return JSValue::encode(jsStringOrNull(exec, String(" . $constant->value . ")));\n");2490 push(@implContent, " return jsStringOrNull(exec, String(" . $constant->value . "));\n"); 2491 2491 } else { 2492 2492 push(@implContent, " UNUSED_PARAM(exec);\n"); 2493 push(@implContent, " return JSValue::encode(jsNumber(static_cast<int>(" . $constant->value . ")));\n");2493 push(@implContent, " return jsNumber(static_cast<int>(" . $constant->value . "));\n"); 2494 2494 } 2495 2495 push(@implContent, "}\n\n"); … … 2499 2499 2500 2500 if ($indexedGetterFunction && !$hasNumericIndexedGetter) { 2501 push(@implContent, "\n EncodedJSValue ${className}::indexGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, unsigned index)\n");2501 push(@implContent, "\nJSValue ${className}::indexGetter(ExecState* exec, JSValue slotBase, unsigned index)\n"); 2502 2502 push(@implContent, "{\n"); 2503 push(@implContent, " ${className}* thisObj = jsCast<$className*>( JSValue::decode(slotBase));\n");2503 push(@implContent, " ${className}* thisObj = jsCast<$className*>(asObject(slotBase));\n"); 2504 2504 push(@implContent, " ASSERT_GC_OBJECT_INHERITS(thisObj, info());\n"); 2505 2505 if ($indexedGetterFunction->signature->type eq "DOMString") { 2506 2506 $implIncludes{"URL.h"} = 1; 2507 push(@implContent, " return JSValue::encode(jsStringOrUndefined(exec, thisObj->impl().item(index)));\n");2507 push(@implContent, " return jsStringOrUndefined(exec, thisObj->impl().item(index));\n"); 2508 2508 } else { 2509 push(@implContent, " return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().item(index)));\n");2509 push(@implContent, " return toJS(exec, thisObj->globalObject(), thisObj->impl().item(index));\n"); 2510 2510 } 2511 2511 push(@implContent, "}\n\n"); … … 2538 2538 push(@implContent, " return collection->hasNamedItem(propertyNameToAtomicString(propertyName));\n"); 2539 2539 push(@implContent, "}\n\n"); 2540 push(@implContent, " EncodedJSValue ${className}::nameGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)\n");2540 push(@implContent, "JSValue ${className}::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)\n"); 2541 2541 push(@implContent, "{\n"); 2542 push(@implContent, " ${className}* thisObj = jsCast<$className*>( JSValue::decode(slotBase));\n");2543 push(@implContent, " return JSValue::encode(toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName))));\n");2542 push(@implContent, " ${className}* thisObj = jsCast<$className*>(asObject(slotBase));\n"); 2543 push(@implContent, " return toJS(exec, thisObj->globalObject(), thisObj->impl().namedItem(propertyNameToAtomicString(propertyName)));\n"); 2544 2544 push(@implContent, "}\n\n"); 2545 2545 } … … 2732 2732 push(@implContent, "$implType* to${interfaceName}(JSC::JSValue value)\n"); 2733 2733 push(@implContent, "{\n"); 2734 push(@implContent, " return value.inherits(${className}::info()) ? &jsCast<$className*>( value)->impl() : 0");2734 push(@implContent, " return value.inherits(${className}::info()) ? &jsCast<$className*>(asObject(value))->impl() : 0"); 2735 2735 push(@implContent, ";\n}\n"); 2736 2736 } … … 2872 2872 if ($function->isStatic) { 2873 2873 AddToImplIncludes("CallbackFunction.h"); 2874 push(@$outputArray, " $name = createFunctionOnlyCallback<${callbackClassName}>(exec, jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), exec->uncheckedArgument($argsIndex));\n");2874 push(@$outputArray, " $name = createFunctionOnlyCallback<${callbackClassName}>(exec, static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), exec->uncheckedArgument($argsIndex));\n"); 2875 2875 } else { 2876 2876 push(@$outputArray, " $name = ${callbackClassName}::create(asObject(exec->uncheckedArgument($argsIndex)), castedThis->globalObject());\n"); … … 2882 2882 if ($function->isStatic) { 2883 2883 AddToImplIncludes("CallbackFunction.h"); 2884 push(@$outputArray, " RefPtr<$argType> $name = createFunctionOnlyCallback<${callbackClassName}>(exec, jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), exec->uncheckedArgument($argsIndex));\n");2884 push(@$outputArray, " RefPtr<$argType> $name = createFunctionOnlyCallback<${callbackClassName}>(exec, static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), exec->uncheckedArgument($argsIndex));\n"); 2885 2885 } else { 2886 2886 push(@$outputArray, " RefPtr<$argType> $name = ${callbackClassName}::create(asObject(exec->uncheckedArgument($argsIndex)), castedThis->globalObject());\n"); -
trunk/Source/WebCore/bridge/runtime_array.cpp
r160133 r160204 61 61 } 62 62 63 EncodedJSValue RuntimeArray::lengthGetter(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)63 JSValue RuntimeArray::lengthGetter(ExecState*, JSValue slotBase, PropertyName) 64 64 { 65 RuntimeArray* thisObj = jsCast<RuntimeArray*>(JSValue::decode(slotBase));66 return JSValue::encode(jsNumber(thisObj->getLength()));65 RuntimeArray* thisObj = static_cast<RuntimeArray*>(asObject(slotBase)); 66 return jsNumber(thisObj->getLength()); 67 67 } 68 68 69 EncodedJSValue RuntimeArray::indexGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, unsigned index)69 JSValue RuntimeArray::indexGetter(ExecState* exec, JSValue slotBase, unsigned index) 70 70 { 71 RuntimeArray* thisObj = jsCast<RuntimeArray*>(JSValue::decode(slotBase));72 return JSValue::encode(thisObj->getConcreteArray()->valueAt(exec, index));71 RuntimeArray* thisObj = static_cast<RuntimeArray*>(asObject(slotBase)); 72 return thisObj->getConcreteArray()->valueAt(exec, index); 73 73 } 74 74 -
trunk/Source/WebCore/bridge/runtime_array.h
r160133 r160204 85 85 private: 86 86 RuntimeArray(ExecState*, Structure*); 87 static EncodedJSValue lengthGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);88 static EncodedJSValue indexGetter(ExecState*, EncodedJSValue, EncodedJSValue, unsigned);87 static JSValue lengthGetter(ExecState*, JSValue, PropertyName); 88 static JSValue indexGetter(ExecState*, JSValue, unsigned); 89 89 90 90 BindingsArray* m_array; -
trunk/Source/WebCore/bridge/runtime_method.cpp
r160133 r160204 55 55 } 56 56 57 EncodedJSValue RuntimeMethod::lengthGetter(ExecState*, EncodedJSValue slotBase, EncodedJSValue, PropertyName)57 JSValue RuntimeMethod::lengthGetter(ExecState*, JSValue slotBase, PropertyName) 58 58 { 59 RuntimeMethod* thisObj = jsCast<RuntimeMethod*>(JSValue::decode(slotBase));59 RuntimeMethod* thisObj = static_cast<RuntimeMethod*>(asObject(slotBase)); 60 60 61 return JSValue::encode(jsNumber(thisObj->m_method->numParameters()));61 return jsNumber(thisObj->m_method->numParameters()); 62 62 } 63 63 -
trunk/Source/WebCore/bridge/runtime_method.h
r160133 r160204 68 68 69 69 private: 70 static EncodedJSValue lengthGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);70 static JSValue lengthGetter(ExecState*, JSValue, PropertyName); 71 71 72 72 Bindings::Method* m_method; -
trunk/Source/WebCore/bridge/runtime_object.cpp
r160133 r160204 63 63 } 64 64 65 EncodedJSValue RuntimeObject::fallbackObjectGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)66 { 67 RuntimeObject* thisObj = jsCast<RuntimeObject*>(JSValue::decode(slotBase));65 JSValue RuntimeObject::fallbackObjectGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName) 66 { 67 RuntimeObject* thisObj = static_cast<RuntimeObject*>(asObject(slotBase)); 68 68 RefPtr<Instance> instance = thisObj->m_instance; 69 69 70 70 if (!instance) 71 return JSValue::encode(throwInvalidAccessError(exec));71 return throwInvalidAccessError(exec); 72 72 73 73 instance->begin(); … … 78 78 instance->end(); 79 79 80 return JSValue::encode(result);81 } 82 83 EncodedJSValue RuntimeObject::fieldGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)80 return result; 81 } 82 83 JSValue RuntimeObject::fieldGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName) 84 84 { 85 RuntimeObject* thisObj = jsCast<RuntimeObject*>(JSValue::decode(slotBase));85 RuntimeObject* thisObj = static_cast<RuntimeObject*>(asObject(slotBase)); 86 86 RefPtr<Instance> instance = thisObj->m_instance; 87 87 88 88 if (!instance) 89 return JSValue::encode(throwInvalidAccessError(exec));89 return throwInvalidAccessError(exec); 90 90 91 91 instance->begin(); … … 97 97 instance->end(); 98 98 99 return JSValue::encode(result);100 } 101 102 EncodedJSValue RuntimeObject::methodGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)103 { 104 RuntimeObject* thisObj = jsCast<RuntimeObject*>(JSValue::decode(slotBase));99 return result; 100 } 101 102 JSValue RuntimeObject::methodGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName) 103 { 104 RuntimeObject* thisObj = static_cast<RuntimeObject*>(asObject(slotBase)); 105 105 RefPtr<Instance> instance = thisObj->m_instance; 106 106 107 107 if (!instance) 108 return JSValue::encode(throwInvalidAccessError(exec));108 return throwInvalidAccessError(exec); 109 109 110 110 instance->begin(); … … 114 114 instance->end(); 115 115 116 return JSValue::encode(method);116 return method; 117 117 } 118 118 -
trunk/Source/WebCore/bridge/runtime_object.h
r160133 r160204 79 79 80 80 private: 81 static EncodedJSValue fallbackObjectGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);82 static EncodedJSValue fieldGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);83 static EncodedJSValue methodGetter(ExecState*, EncodedJSValue, EncodedJSValue, PropertyName);81 static JSValue fallbackObjectGetter(ExecState*, JSValue, PropertyName); 82 static JSValue fieldGetter(ExecState*, JSValue, PropertyName); 83 static JSValue methodGetter(ExecState*, JSValue, PropertyName); 84 84 85 85 RefPtr<Instance> m_instance; -
trunk/Source/WebKit2/ChangeLog
r160197 r160204 1 2013-12-05 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r160133. 4 http://trac.webkit.org/changeset/160133 5 https://bugs.webkit.org/show_bug.cgi?id=125325 6 7 broke bindings tests on all the bots (Requested by thorton on 8 #webkit). 9 10 * WebProcess/Plugins/Netscape/JSNPMethod.cpp: 11 (WebKit::callMethod): 12 * WebProcess/Plugins/Netscape/JSNPObject.cpp: 13 (WebKit::callNPJSObject): 14 (WebKit::constructWithConstructor): 15 (WebKit::JSNPObject::propertyGetter): 16 (WebKit::JSNPObject::methodGetter): 17 * WebProcess/Plugins/Netscape/JSNPObject.h: 18 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: 19 (WebKit::NPRuntimeObjectMap::getOrCreateNPObject): 20 (WebKit::NPRuntimeObjectMap::finalize): 21 * WebProcess/WebPage/WebFrame.cpp: 22 (WebKit::WebFrame::counterValue): 23 1 24 2013-12-05 Chris Fleizach <cfleizach@apple.com> 2 25 -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPMethod.cpp
r160133 r160204 60 60 static EncodedJSValue JSC_HOST_CALL callMethod(ExecState* exec) 61 61 { 62 JSNPMethod* jsNPMethod = jsCast<JSNPMethod*>(exec->callee());62 JSNPMethod* jsNPMethod = static_cast<JSNPMethod*>(exec->callee()); 63 63 64 64 JSValue thisValue = exec->hostThisValue(); … … 66 66 // Check if we're calling a method on the plug-in script object. 67 67 if (thisValue.inherits(JSHTMLElement::info())) { 68 JSHTMLElement* element = jsCast<JSHTMLElement*>(asObject(thisValue));68 JSHTMLElement* element = static_cast<JSHTMLElement*>(asObject(thisValue)); 69 69 70 70 // Try to get the script object from the element … … 74 74 75 75 if (thisValue.inherits(JSNPObject::info())) { 76 JSNPObject* jsNPObject = jsCast<JSNPObject*>(asObject(thisValue));76 JSNPObject* jsNPObject = static_cast<JSNPObject*>(asObject(thisValue)); 77 77 78 78 return JSValue::encode(jsNPObject->callMethod(exec, jsNPMethod->npIdentifier())); -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.cpp
r160133 r160204 226 226 ASSERT(object->inherits(JSNPObject::info())); 227 227 228 return JSValue::encode( jsCast<JSNPObject*>(object)->callObject(exec));228 return JSValue::encode(static_cast<JSNPObject*>(object)->callObject(exec)); 229 229 } 230 230 … … 245 245 ASSERT(constructor->inherits(JSNPObject::info())); 246 246 247 return JSValue::encode( jsCast<JSNPObject*>(constructor)->callConstructor(exec));247 return JSValue::encode(static_cast<JSNPObject*>(constructor)->callConstructor(exec)); 248 248 } 249 249 … … 418 418 } 419 419 420 EncodedJSValue JSNPObject::propertyGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)421 { 422 JSNPObject* thisObj = jsCast<JSNPObject*>(JSValue::decode(slotBase));420 JSValue JSNPObject::propertyGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName) 421 { 422 JSNPObject* thisObj = static_cast<JSNPObject*>(asObject(slotBase)); 423 423 ASSERT_GC_OBJECT_INHERITS(thisObj, info()); 424 424 425 425 if (!thisObj->m_npObject) 426 return JSValue::encode(throwInvalidAccessError(exec));426 return throwInvalidAccessError(exec); 427 427 428 428 if (!thisObj->m_npObject->_class->getProperty) 429 return JSValue::encode(jsUndefined());429 return jsUndefined(); 430 430 431 431 NPVariant result; … … 447 447 448 448 if (!returnValue) 449 return JSValue::encode(jsUndefined());449 return jsUndefined(); 450 450 451 451 JSValue propertyValue = thisObj->m_objectMap->convertNPVariantToJSValue(exec, thisObj->globalObject(), result); 452 452 releaseNPVariantValue(&result); 453 return JSValue::encode(propertyValue);454 } 455 456 EncodedJSValue JSNPObject::methodGetter(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName propertyName)457 { 458 JSNPObject* thisObj = jsCast<JSNPObject*>(JSValue::decode(slotBase));453 return propertyValue; 454 } 455 456 JSValue JSNPObject::methodGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName) 457 { 458 JSNPObject* thisObj = static_cast<JSNPObject*>(asObject(slotBase)); 459 459 ASSERT_GC_OBJECT_INHERITS(thisObj, info()); 460 460 461 461 if (!thisObj->m_npObject) 462 return JSValue::encode(throwInvalidAccessError(exec));462 return throwInvalidAccessError(exec); 463 463 464 464 NPIdentifier npIdentifier = npIdentifierFromIdentifier(propertyName); 465 return JS Value::encode(JSNPMethod::create(exec, thisObj->globalObject(), propertyName.publicName(), npIdentifier));465 return JSNPMethod::create(exec, thisObj->globalObject(), propertyName.publicName(), npIdentifier); 466 466 } 467 467 -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.h
r160133 r160204 96 96 static void getOwnPropertyNames(JSC::JSObject*, JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode); 97 97 98 static JSC:: EncodedJSValue propertyGetter(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);99 static JSC:: EncodedJSValue methodGetter(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue, JSC::PropertyName);98 static JSC::JSValue propertyGetter(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 99 static JSC::JSValue methodGetter(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 100 100 static JSC::JSObject* throwInvalidAccessError(JSC::ExecState*); 101 101 -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp
r160133 r160204 73 73 // If this is a JSNPObject, we can just get its underlying NPObject. 74 74 if (jsObject->classInfo() == JSNPObject::info()) { 75 JSNPObject* jsNPObject = jsCast<JSNPObject*>(jsObject);75 JSNPObject* jsNPObject = static_cast<JSNPObject*>(jsObject); 76 76 NPObject* npObject = jsNPObject->npObject(); 77 77 … … 303 303 void NPRuntimeObjectMap::finalize(JSC::Handle<JSC::Unknown> handle, void* context) 304 304 { 305 JSNPObject* object = jsCast<JSNPObject*>(handle.get().asCell());305 JSNPObject* object = static_cast<JSNPObject*>(handle.get().asCell()); 306 306 weakRemove(m_jsNPObjects, static_cast<NPObject*>(context), object); 307 307 addToInvalidationQueue(object->leakNPObject()); -
trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp
r160133 r160204 665 665 return String(); 666 666 667 return counterValueForElement(& jsCast<JSElement*>(toJS(element))->impl());667 return counterValueForElement(&static_cast<JSElement*>(toJS(element))->impl()); 668 668 } 669 669
Note: See TracChangeset
for help on using the changeset viewer.