From 9756397b76690b3494e973c59c2a075bb7acecab Mon Sep 17 00:00:00 2001 From: "kmillikin@chromium.org" Date: Tue, 14 Jun 2011 19:26:09 +0000 Subject: [PATCH] Fix invalid assertion. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime.cc b/src/runtime.cc index 7330526..079a9b8 100644 --- a/src/runtime.cc +++ b/src/runtime.cc @@ -1232,7 +1232,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DeclareContextSlot) { // Declarations are always done in the function context. context = Handle(context->fcontext()); - ASSERT(context->IsFunctionContext()); + ASSERT(context->IsFunctionContext() || context->IsGlobalContext()); int index; PropertyAttributes attributes; -- 2.7.4