Changeset 38148 in webkit for trunk/JavaScriptCore/VM
- Timestamp:
- Nov 5, 2008, 7:26:30 PM (17 years ago)
- Location:
- trunk/JavaScriptCore/VM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/CTI.cpp
r38012 r38148 629 629 if (opcodeID != op_construct) { 630 630 int thisVal = instruction[3].u.operand; 631 if (thisVal == missingThisObjectMarker()) { 632 // FIXME: should this be loaded dynamically off m_callFrame? 633 m_jit.movl_i32m(asInteger(m_callFrame->globalThisValue()), firstArg * sizeof(Register), X86::edi); 634 } else { 631 if (thisVal == missingThisObjectMarker()) 632 m_jit.movl_i32m(asInteger(jsNull()), firstArg * sizeof(Register), X86::edi); 633 else { 635 634 emitGetArg(thisVal, X86::eax); 636 635 emitPutResult(firstArg); -
trunk/JavaScriptCore/VM/Machine.cpp
r38137 r38148 4819 4819 { 4820 4820 SamplingTool::HostCallRecord callRecord(CTI_SAMPLER); 4821 returnValue = callData.native.function(callFrame, asObject(funcVal), argv[0].jsValue(callFrame), argList); 4821 4822 // All host methods should be calling toThisObject, but this is not presently the case. 4823 JSValue* thisValue = argv[0].jsValue(callFrame); 4824 if (thisValue == jsNull()) 4825 thisValue = callFrame->globalThisValue(); 4826 4827 returnValue = callData.native.function(callFrame, asObject(funcVal), thisValue, argList); 4822 4828 } 4823 4829 ARG_setCallFrame(previousCallFrame); … … 5645 5651 5646 5652 if (baseVal == scopeChain->globalObject() && funcVal == scopeChain->globalObject()->evalFunction()) { 5647 JSObject* thisObject = asObject(callFrame[codeBlock->thisRegister].jsValue(callFrame));5653 JSObject* thisObject = callFrame[codeBlock->thisRegister].jsValue(callFrame)->toThisObject(callFrame); 5648 5654 JSValue* exceptionValue = noValue(); 5649 5655 JSValue* result = machine->callEval(callFrame, thisObject, scopeChain, registerFile, registerOffset - RegisterFile::CallFrameHeaderSize - argCount, argCount, exceptionValue);
Note:
See TracChangeset
for help on using the changeset viewer.