Changeset 56532 in webkit
- Timestamp:
- Mar 25, 2010 5:19:35 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r56530 r56532 1 2010-03-25 Pavel Feldman <pfeldman@chromium.org> 2 3 Reviewed by Timothy Hatcher. 4 5 Web Inspector: Expect console object wrapping to fail. 6 7 https://bugs.webkit.org/show_bug.cgi?id=36587 8 9 * inspector/front-end/InjectedScript.js: 10 (injectedScriptConstructor): 11 1 12 2010-03-25 Joanmarie Diggs <joanmarie.diggs@gmail.com> 2 13 -
trunk/WebCore/inspector/InjectedScript.cpp
r54421 r56532 75 75 wrapFunction.appendArgument(value); 76 76 wrapFunction.appendArgument("console"); 77 ScriptValue r = wrapFunction.call(); 77 bool hadException = false; 78 ScriptValue r = wrapFunction.call(hadException); 79 if (hadException) 80 return SerializedScriptValue::create("<exception>"); 78 81 return r.serialize(m_injectedScriptObject.scriptState()); 79 82 } -
trunk/WebCore/inspector/front-end/InjectedScript.js
r56393 r56532 36 36 InjectedScript.wrapObject = function(object, objectGroupName) 37 37 { 38 var objectId; 39 if (typeof object === "object" || typeof object === "function" || 40 (typeof object === "undefined" && object instanceof inspectedWindow.HTMLAllCollection)) { // FIXME(33716) 41 var id = InjectedScript.lastBoundObjectId++; 42 objectId = "object#" + id; 43 InjectedScript.idToWrappedObject[objectId] = object; 44 45 var group = InjectedScript.objectGroups[objectGroupName]; 46 if (!group) { 47 group = []; 48 InjectedScript.objectGroups[objectGroupName] = group; 49 } 50 group.push(objectId); 38 try { 39 var objectId; 40 if (typeof object === "object" || typeof object === "function" || InjectedScript._isHTMLAllCollection(object)) { 41 var id = InjectedScript.lastBoundObjectId++; 42 objectId = "object#" + id; 43 InjectedScript.idToWrappedObject[objectId] = object; 44 45 var group = InjectedScript.objectGroups[objectGroupName]; 46 if (!group) { 47 group = []; 48 InjectedScript.objectGroups[objectGroupName] = group; 49 } 50 group.push(objectId); 51 } 52 return InjectedScript.createProxyObject(object, objectId); 53 } catch (e) { 54 return InjectedScript.createProxyObject("[ Exception: " + e.toString() + " ]"); 51 55 } 52 56 return InjectedScript.createProxyObject(object, objectId); … … 874 878 InjectedScript._isDefined = function(object) 875 879 { 876 return object || object instanceof inspectedWindow.HTMLAllCollection; 880 return object || InjectedScript._isHTMLAllCollection(object); 881 } 882 883 InjectedScript._isHTMLAllCollection = function(object) 884 { 885 // document.all is reported as undefined, but we still want to process it. 886 return (typeof object === "undefined") && inspectedWindow.HTMLAllCollection && object instanceof inspectedWindow.HTMLAllCollection; 877 887 } 878 888 … … 883 893 884 894 // FIXME(33716): typeof document.all is always 'undefined'. 885 if ( obj instanceof inspectedWindow.HTMLAllCollection)895 if (InjectedScript._isHTMLAllCollection(obj)) 886 896 return "array"; 887 897 … … 908 918 if (obj instanceof win.NodeList) 909 919 return "array"; 910 if (obj instanceof win.HTMLCollection || obj instanceof win.HTMLAllCollection)920 if (obj instanceof win.HTMLCollection) 911 921 return "array"; 912 922 if (obj instanceof win.Error)
Note: See TracChangeset
for help on using the changeset viewer.