Changeset 38148 in webkit for trunk/JavaScriptCore/VM/Machine.cpp
- Timestamp:
- Nov 5, 2008, 7:26:30 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.