Changeset 53945 in webkit
- Timestamp:
- Jan 27, 2010 11:30:19 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r53944 r53945 1 2010-01-27 Yury Semikhatsky <yurys@chromium.org> 2 3 Reviewed by Oliver Hunt. 4 5 Instead of relying on Object.prototype.toString result use JSObject::isActivationObject 6 to check if a scope node is a JSActivation. Object.prototype.toString for JSActivation 7 will call JSActivation::toThisObject whose result depends on the current call stack. 8 9 https://bugs.webkit.org/show_bug.cgi?id=34161 10 11 Test: WebCore/manual-tests/inspector/debugger-scopes-inspection.html 12 13 * bindings/js/JSInjectedScriptHostCustom.cpp: 14 (WebCore::JSInjectedScriptHost::isActivation): 15 * inspector/InjectedScriptHost.idl: 16 * inspector/front-end/InjectedScript.js: 17 (injectedScriptConstructor.): 18 * manual-tests/inspector/debugger-scopes-inspection.html: Added. 19 1 20 2010-01-27 Anton Muhin <antonm@google.com> 2 21 Review by Adam Barth. -
trunk/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp
r53766 r53945 127 127 } 128 128 129 JSValue JSInjectedScriptHost::isActivation(ExecState* exec, const ArgList& args) 130 { 131 if (args.size() < 1) 132 return jsUndefined(); 133 134 JSValue value = args.at(0); 135 if (!value.isObject()) 136 return jsBoolean(false); 137 138 JSObject* object = value.toObject(exec); 139 return jsBoolean(object->isActivationObject()); 140 } 141 129 142 #endif 130 143 -
trunk/WebCore/inspector/InjectedScriptHost.idl
r53766 r53945 44 44 #if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER 45 45 [Custom] DOMObject currentCallFrame(); 46 [Custom] boolean isActivation(in DOMObject object); 46 47 #endif 47 48 -
trunk/WebCore/inspector/front-end/InjectedScript.js
r53807 r53945 1183 1183 var scopeObjectProxy = InjectedScript.createProxyObject(scopeObject, { callFrame: this.id, chainIndex: i }, true); 1184 1184 1185 if ( Object.prototype.toString.call(scopeObject) === "[object JSActivation]") {1185 if (InjectedScriptHost.isActivation(scopeObject)) { 1186 1186 if (!foundLocalScope) 1187 1187 scopeObjectProxy.thisObject = InjectedScript.createProxyObject(callFrame.thisObject, { callFrame: this.id, thisObject: true }, true);
Note: See TracChangeset
for help on using the changeset viewer.