Fix invalid assertion.
authorkmillikin@chromium.org <kmillikin@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 14 Jun 2011 19:26:09 +0000 (19:26 +0000)
committerkmillikin@chromium.org <kmillikin@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 14 Jun 2011 19:26:09 +0000 (19:26 +0000)
Runtime_DeclareContextSlot is used to declare global variables.

R=vegorov@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7158001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8285 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/runtime.cc

index 73305261630314d59c95664e985cd0f7be639808..079a9b89dc877952a9793a8379a0ffe48aafc212 100644 (file)
@@ -1232,7 +1232,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DeclareContextSlot) {
 
   // Declarations are always done in the function context.
   context = Handle<Context>(context->fcontext());
-  ASSERT(context->IsFunctionContext());
+  ASSERT(context->IsFunctionContext() || context->IsGlobalContext());
 
   int index;
   PropertyAttributes attributes;