Changeset 209958 in webkit
- Timestamp:
- Dec 16, 2016 9:05:17 PM (7 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r209956 r209958 1 2016-12-16 Joseph Pecoraro <pecoraro@apple.com> 2 3 JSContext Inspector: Avoid some possible exceptions inspecting a JSContext 4 https://bugs.webkit.org/show_bug.cgi?id=165986 5 <rdar://problem/29551379> 6 7 Reviewed by Matt Baker. 8 9 * inspector/InjectedScriptSource.js: 10 (InjectedScript.prototype.processProperties): 11 Prefer String.prototype.endsWith now that it is available. 12 13 (InjectedScript.prototype._describe): 14 Prefer Function.prototype.toString for converting functions to String. 15 Previously we were doing String(f) which would to Symbol.toPrimitive 16 conversion which seems unnecessary here. 17 1 18 2016-12-16 Michael Catanzaro <mcatanzaro@igalia.com> 2 19 -
trunk/Source/JavaScriptCore/inspector/InjectedScriptSource.js
r208725 r209958 56 56 } 57 57 58 function endsWith(str, suffix)59 {60 var position = str.length - suffix.length;61 if (position < 0)62 return false;63 return str.indexOf(suffix, position) === position;64 }65 66 58 function isSymbol(obj) 67 59 { … … 654 646 655 647 if (nativeGettersAsValues) { 656 if ( endsWith(String(descriptor.get),"[native code]\n}") || (!descriptor.get && descriptor.hasOwnProperty("get") && !descriptor.set && descriptor.hasOwnProperty("set"))) {648 if (String(descriptor.get).endsWith("[native code]\n}") || (!descriptor.get && descriptor.hasOwnProperty("get") && !descriptor.set && descriptor.hasOwnProperty("set"))) { 657 649 // Developers may create such a descriptor, so we should be resilient: 658 650 // var x = {}; Object.defineProperty(x, "p", {get:undefined}); Object.getOwnPropertyDescriptor(x, "p") … … 816 808 // NodeList in JSC is a function, check for array prior to this. 817 809 if (typeof obj === "function") 818 return toString(obj);810 return obj.toString(); 819 811 820 812 // If Object, try for a better name from the constructor. -
trunk/Source/WebInspectorUI/ChangeLog
r209933 r209958 1 2016-12-16 Joseph Pecoraro <pecoraro@apple.com> 2 3 JSContext Inspector: Avoid some possible exceptions inspecting a JSContext 4 https://bugs.webkit.org/show_bug.cgi?id=165986 5 <rdar://problem/29551379> 6 7 Reviewed by Matt Baker. 8 9 * UserInterface/Base/Main.js: 10 There will not be a main frame if we are debugging a JSContext. 11 In those cases do not change the title. 12 13 * UserInterface/Views/ResourceSidebarPanel.js: 14 (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded): 15 There may not be a parent folder in JavaScript inspection. In that case 16 ScriptTreeElements are added to the Top Level, not folders. 17 1 18 2016-12-16 Matt Baker <mattbaker@apple.com> 2 19 -
trunk/Source/WebInspectorUI/UserInterface/Base/Main.js
r209882 r209958 693 693 { 694 694 var mainFrame = this.frameResourceManager.mainFrame; 695 console.assert(mainFrame); 695 if (!mainFrame) 696 return; 696 697 697 698 var urlComponents = mainFrame.mainResource.urlComponents; -
trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js
r208520 r209958 321 321 } 322 322 323 parentFolderTreeElement.representedObject.add(script); 323 if (parentFolderTreeElement) 324 parentFolderTreeElement.representedObject.add(script); 324 325 325 326 var scriptTreeElement = new WebInspector.ScriptTreeElement(script);
Note: See TracChangeset
for help on using the changeset viewer.