Reviewed by John.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Apr 2004 22:19:23 +0000 (22:19 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Apr 2004 22:19:23 +0000 (22:19 +0000)
- fix deployment build by avoiding deployment-only warning.

        * kjs/scope_chain.cpp:
        (KJS::ScopeChain::bottom):

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

JavaScriptCore/ChangeLog
JavaScriptCore/kjs/scope_chain.cpp

index 7201d9c6db5255cdb2a61aeecdbbfb7aabf4f65b..6f9ebfca000acfad17e8fee0ee8e683967e006c1 100644 (file)
@@ -1,3 +1,12 @@
+2004-04-09  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by John.
+
+       - fix deployment build by avoiding deployment-only warning.
+
+        * kjs/scope_chain.cpp:
+        (KJS::ScopeChain::bottom):
+
 2004-04-09  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by John.
index 88f7f7439ba4b3cbae25f0a33fea9ba306c390ee..0fec3f4c93557a1ec41624895ac370a1a3436500 100644 (file)
@@ -86,12 +86,16 @@ void ScopeChain::mark()
 
 ObjectImp *ScopeChain::bottom() const
 {
-    ScopeChainNode *last;
+    ScopeChainNode *last = 0;
     for (ScopeChainNode *n = _node; n; n = n->next) {
        if (!n->next) {
            last = n;
        }
     }
+    if (!last) {
+       return 0;
+    }
+
     return last->object;
 }