Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Unified Diff: src/contexts.cc

Issue 12300018: Made Isolate a mandatory parameter for everything Handle-related. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed CreateCode calls. Be nicer to MIPS. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler.cc ('k') | src/debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/contexts.cc
diff --git a/src/contexts.cc b/src/contexts.cc
index 4cb52d3a6c0cd34ee8597ba4f846853cb0f057fc..5edbc5ac2d3d8f8a4c97a37f41f617f95b26c2ac 100644
--- a/src/contexts.cc
+++ b/src/contexts.cc
@@ -327,14 +327,11 @@ void Context::ClearOptimizedFunctions() {
Handle<Object> Context::ErrorMessageForCodeGenerationFromStrings() {
- Handle<Object> result(error_message_for_code_gen_from_strings());
- if (result->IsUndefined()) {
- const char* error =
- "Code generation from strings disallowed for this context";
- Isolate* isolate = Isolate::Current();
- result = isolate->factory()->NewStringFromAscii(i::CStrVector(error));
- }
- return result;
+ Handle<Object> result(error_message_for_code_gen_from_strings(),
+ GetIsolate());
+ if (!result->IsUndefined()) return result;
+ return GetIsolate()->factory()->NewStringFromAscii(i::CStrVector(
+ "Code generation from strings disallowed for this context"));
}
@@ -343,7 +340,7 @@ bool Context::IsBootstrappingOrValidParentContext(
Object* object, Context* child) {
// During bootstrapping we allow all objects to pass as
// contexts. This is necessary to fix circular dependencies.
- if (Isolate::Current()->bootstrapper()->IsActive()) return true;
+ if (child->GetIsolate()->bootstrapper()->IsActive()) return true;
if (!object->IsContext()) return false;
Context* context = Context::cast(object);
return context->IsNativeContext() || context->IsGlobalContext() ||
« no previous file with comments | « src/compiler.cc ('k') | src/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698