Index: src/contexts.cc |
diff --git a/src/contexts.cc b/src/contexts.cc |
index 392a3ccaa01c336ffdc044ed63dac8794c9144e1..52652e9a4eb0ceac6c61a59bb6891c03959e5156 100644 |
--- a/src/contexts.cc |
+++ b/src/contexts.cc |
@@ -484,9 +484,10 @@ void Context::RemoveOptimizedFunction(JSFunction* function) { |
DCHECK(IsNativeContext()); |
Object* element = get(OPTIMIZED_FUNCTIONS_LIST); |
JSFunction* prev = NULL; |
- while (!element->IsUndefined()) { |
+ Isolate* isolate = function->GetIsolate(); |
+ while (!element->IsUndefined(isolate)) { |
JSFunction* element_function = JSFunction::cast(element); |
- DCHECK(element_function->next_function_link()->IsUndefined() || |
+ DCHECK(element_function->next_function_link()->IsUndefined(isolate) || |
element_function->next_function_link()->IsJSFunction()); |
if (element_function == function) { |
if (prev == NULL) { |
@@ -555,7 +556,7 @@ Object* Context::DeoptimizedCodeListHead() { |
Handle<Object> Context::ErrorMessageForCodeGenerationFromStrings() { |
Isolate* isolate = GetIsolate(); |
Handle<Object> result(error_message_for_code_gen_from_strings(), isolate); |
- if (!result->IsUndefined()) return result; |
+ if (!result->IsUndefined(isolate)) return result; |
return isolate->factory()->NewStringFromStaticChars( |
"Code generation from strings disallowed for this context"); |
} |