Web Inspector: don't allow exception in front-end when expanding function scope
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Sep 2012 14:10:10 +0000 (14:10 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Sep 2012 14:10:10 +0000 (14:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=97346

Patch by Peter Rybin <peter.rybin@gmail.com> on 2012-09-24
Reviewed by Yury Semikhatsky.

A missing guard condition is added.

* inspector/front-end/ObjectPropertiesSection.js:
(WebInspector.FunctionScopeMainTreeElement.prototype.onpopulate.didGetDetails):
(WebInspector.FunctionScopeMainTreeElement.prototype.onpopulate):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@129361 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/ObjectPropertiesSection.js

index e5e18be..cf3661a 100644 (file)
@@ -1,3 +1,16 @@
+2012-09-24  Peter Rybin  <peter.rybin@gmail.com>
+
+        Web Inspector: don't allow exception in front-end when expanding function scope
+        https://bugs.webkit.org/show_bug.cgi?id=97346
+
+        Reviewed by Yury Semikhatsky.
+
+        A missing guard condition is added.
+
+        * inspector/front-end/ObjectPropertiesSection.js:
+        (WebInspector.FunctionScopeMainTreeElement.prototype.onpopulate.didGetDetails):
+        (WebInspector.FunctionScopeMainTreeElement.prototype.onpopulate):
+
 2012-09-24  Arvid Nilsson  <anilsson@rim.com>
 
         [BlackBerry] Add cookie database API
index e9a0970..c58ff53 100644 (file)
@@ -438,6 +438,8 @@ WebInspector.FunctionScopeMainTreeElement.prototype = {
             this.removeChildren();
 
             var scopeChain = response.scopeChain;
+            if (!scopeChain)
+                return;
             for (var i = 0; i < scopeChain.length; ++i) {
                 var scope = scopeChain[i];
                 var title = null;