Ensure that the current isolate is initialized in the API function Context::GetEntered.
authorsvenpanne@chromium.org <svenpanne@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 22 Aug 2011 13:04:14 +0000 (13:04 +0000)
committersvenpanne@chromium.org <svenpanne@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 22 Aug 2011 13:04:14 +0000 (13:04 +0000)
r8833 introduced a regression in our API semantics, showing up in e.g.
Chrome 12, which is fixed by this patch.
Review URL: http://codereview.chromium.org/7686005

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

src/api.cc

index 5a5f14dc657385cda8d99072134ebdcd4ef7f588..f6291163bf1b77a4c3b1ff225b4ac38c2d069af5 100644 (file)
@@ -4118,7 +4118,7 @@ bool Context::InContext() {
 
 v8::Local<v8::Context> Context::GetEntered() {
   i::Isolate* isolate = i::Isolate::Current();
-  if (IsDeadCheck(isolate, "v8::Context::GetEntered()")) {
+  if (!EnsureInitializedForIsolate(isolate, "v8::Context::GetEntered()")) {
     return Local<Context>();
   }
   i::Handle<i::Object> last =