Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index c379ec9101a463ac36f25a334995395dcca2e7a6..6946b1a5a79ed08264aa340f9b6a9e3e691b0b9f 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -760,7 +760,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_SetAdd) { |
HandleScope scope(isolate); |
ASSERT(args.length() == 2); |
CONVERT_ARG_HANDLE_CHECKED(JSSet, holder, 0); |
- Handle<Object> key(args[1]); |
+ Handle<Object> key(args[1], isolate); |
Handle<ObjectHashSet> table(ObjectHashSet::cast(holder->table())); |
table = ObjectHashSetAdd(table, key); |
holder->set_table(*table); |
@@ -772,7 +772,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_SetHas) { |
HandleScope scope(isolate); |
ASSERT(args.length() == 2); |
CONVERT_ARG_HANDLE_CHECKED(JSSet, holder, 0); |
- Handle<Object> key(args[1]); |
+ Handle<Object> key(args[1], isolate); |
Handle<ObjectHashSet> table(ObjectHashSet::cast(holder->table())); |
return isolate->heap()->ToBoolean(table->Contains(*key)); |
} |
@@ -782,7 +782,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_SetDelete) { |
HandleScope scope(isolate); |
ASSERT(args.length() == 2); |
CONVERT_ARG_HANDLE_CHECKED(JSSet, holder, 0); |
- Handle<Object> key(args[1]); |
+ Handle<Object> key(args[1], isolate); |
Handle<ObjectHashSet> table(ObjectHashSet::cast(holder->table())); |
table = ObjectHashSetRemove(table, key); |
holder->set_table(*table); |
@@ -815,7 +815,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_MapGet) { |
CONVERT_ARG_HANDLE_CHECKED(JSMap, holder, 0); |
CONVERT_ARG_HANDLE_CHECKED(Object, key, 1); |
Handle<ObjectHashTable> table(ObjectHashTable::cast(holder->table())); |
- Handle<Object> lookup(table->Lookup(*key)); |
+ Handle<Object> lookup(table->Lookup(*key), isolate); |
return lookup->IsTheHole() ? isolate->heap()->undefined_value() : *lookup; |
} |
@@ -826,7 +826,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_MapHas) { |
CONVERT_ARG_HANDLE_CHECKED(JSMap, holder, 0); |
CONVERT_ARG_HANDLE_CHECKED(Object, key, 1); |
Handle<ObjectHashTable> table(ObjectHashTable::cast(holder->table())); |
- Handle<Object> lookup(table->Lookup(*key)); |
+ Handle<Object> lookup(table->Lookup(*key), isolate); |
return isolate->heap()->ToBoolean(!lookup->IsTheHole()); |
} |
@@ -837,7 +837,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_MapDelete) { |
CONVERT_ARG_HANDLE_CHECKED(JSMap, holder, 0); |
CONVERT_ARG_HANDLE_CHECKED(Object, key, 1); |
Handle<ObjectHashTable> table(ObjectHashTable::cast(holder->table())); |
- Handle<Object> lookup(table->Lookup(*key)); |
+ Handle<Object> lookup(table->Lookup(*key), isolate); |
Handle<ObjectHashTable> new_table = |
PutIntoObjectHashTable(table, key, isolate->factory()->the_hole_value()); |
holder->set_table(*new_table); |
@@ -891,7 +891,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_WeakMapGet) { |
CONVERT_ARG_HANDLE_CHECKED(JSWeakMap, weakmap, 0); |
CONVERT_ARG_HANDLE_CHECKED(JSReceiver, key, 1); |
Handle<ObjectHashTable> table(ObjectHashTable::cast(weakmap->table())); |
- Handle<Object> lookup(table->Lookup(*key)); |
+ Handle<Object> lookup(table->Lookup(*key), isolate); |
return lookup->IsTheHole() ? isolate->heap()->undefined_value() : *lookup; |
} |
@@ -902,7 +902,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_WeakMapHas) { |
CONVERT_ARG_HANDLE_CHECKED(JSWeakMap, weakmap, 0); |
CONVERT_ARG_HANDLE_CHECKED(JSReceiver, key, 1); |
Handle<ObjectHashTable> table(ObjectHashTable::cast(weakmap->table())); |
- Handle<Object> lookup(table->Lookup(*key)); |
+ Handle<Object> lookup(table->Lookup(*key), isolate); |
return isolate->heap()->ToBoolean(!lookup->IsTheHole()); |
} |
@@ -913,7 +913,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_WeakMapDelete) { |
CONVERT_ARG_HANDLE_CHECKED(JSWeakMap, weakmap, 0); |
CONVERT_ARG_HANDLE_CHECKED(JSReceiver, key, 1); |
Handle<ObjectHashTable> table(ObjectHashTable::cast(weakmap->table())); |
- Handle<Object> lookup(table->Lookup(*key)); |
+ Handle<Object> lookup(table->Lookup(*key), isolate); |
Handle<ObjectHashTable> new_table = |
PutIntoObjectHashTable(table, key, isolate->factory()->the_hole_value()); |
weakmap->set_table(*new_table); |
@@ -926,7 +926,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_WeakMapSet) { |
ASSERT(args.length() == 3); |
CONVERT_ARG_HANDLE_CHECKED(JSWeakMap, weakmap, 0); |
CONVERT_ARG_HANDLE_CHECKED(JSReceiver, key, 1); |
- Handle<Object> value(args[2]); |
+ Handle<Object> value(args[2], isolate); |
Handle<ObjectHashTable> table(ObjectHashTable::cast(weakmap->table())); |
Handle<ObjectHashTable> new_table = PutIntoObjectHashTable(table, key, value); |
weakmap->set_table(*new_table); |
@@ -935,7 +935,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_WeakMapSet) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_ClassOf) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
Object* obj = args[0]; |
if (!obj->IsJSObject()) return isolate->heap()->null_value(); |
@@ -944,7 +944,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_ClassOf) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_GetPrototype) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
CONVERT_ARG_CHECKED(JSReceiver, input_obj, 0); |
Object* obj = input_obj; |
@@ -966,7 +966,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetPrototype) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_IsInPrototypeChain) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
// See ECMA-262, section 15.3.5.3, page 88 (steps 5 - 8). |
Object* O = args[0]; |
@@ -1122,7 +1122,7 @@ static MaybeObject* GetOwnProperty(Isolate* isolate, |
if (raw_accessors == NULL) { |
elms->set(WRITABLE_INDEX, heap->ToBoolean((attrs & READ_ONLY) == 0)); |
// GetProperty does access check. |
- Handle<Object> value = GetProperty(obj, name); |
+ Handle<Object> value = GetProperty(isolate, obj, name); |
if (value.is_null()) return Failure::Exception(); |
elms->set(VALUE_INDEX, *value); |
} else { |
@@ -1476,7 +1476,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DeclareContextSlot) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_InitializeVarGlobal) { |
- NoHandleAllocation nha; |
+ NoHandleAllocation nha(isolate); |
// args[0] == name |
// args[1] == language_mode |
// args[2] == value (optional) |
@@ -1949,7 +1949,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_MaterializeRegExpLiteral) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionGetName) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
CONVERT_ARG_CHECKED(JSFunction, f, 0); |
@@ -1958,7 +1958,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionGetName) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionSetName) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_ARG_CHECKED(JSFunction, f, 0); |
@@ -1969,7 +1969,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionSetName) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionNameShouldPrintAsAnonymous) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
CONVERT_ARG_CHECKED(JSFunction, f, 0); |
return isolate->heap()->ToBoolean( |
@@ -1978,7 +1978,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionNameShouldPrintAsAnonymous) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionMarkNameShouldPrintAsAnonymous) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
CONVERT_ARG_CHECKED(JSFunction, f, 0); |
f->shared()->set_name_should_print_as_anonymous(true); |
@@ -1987,7 +1987,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionMarkNameShouldPrintAsAnonymous) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionRemovePrototype) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
CONVERT_ARG_CHECKED(JSFunction, f, 0); |
@@ -2020,7 +2020,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionGetSourceCode) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionGetScriptSourcePosition) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
CONVERT_ARG_CHECKED(JSFunction, fun, 0); |
@@ -2043,7 +2043,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionGetPositionForOffset) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionSetInstanceClassName) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_ARG_CHECKED(JSFunction, fun, 0); |
@@ -2054,7 +2054,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionSetInstanceClassName) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionSetLength) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_ARG_CHECKED(JSFunction, fun, 0); |
@@ -2065,7 +2065,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionSetLength) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionSetPrototype) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_ARG_CHECKED(JSFunction, fun, 0); |
@@ -2080,7 +2080,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionSetPrototype) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionSetReadOnlyPrototype) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
RUNTIME_ASSERT(args.length() == 1); |
CONVERT_ARG_CHECKED(JSFunction, function, 0); |
@@ -2123,7 +2123,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionSetReadOnlyPrototype) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionIsAPIFunction) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
CONVERT_ARG_CHECKED(JSFunction, f, 0); |
@@ -2132,7 +2132,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionIsAPIFunction) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionIsBuiltin) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
CONVERT_ARG_CHECKED(JSFunction, f, 0); |
@@ -2227,7 +2227,7 @@ MUST_USE_RESULT static MaybeObject* CharFromCode(Isolate* isolate, |
RUNTIME_FUNCTION(MaybeObject*, Runtime_StringCharCodeAt) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_ARG_CHECKED(String, subject, 0); |
@@ -2251,7 +2251,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringCharCodeAt) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_CharFromCode) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
return CharFromCode(isolate, args[0]); |
} |
@@ -3477,7 +3477,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringLastIndexOf) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_StringLocaleCompare) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_ARG_CHECKED(String, str1, 0); |
@@ -3525,7 +3525,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringLocaleCompare) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_SubString) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 3); |
CONVERT_ARG_CHECKED(String, value, 0); |
@@ -3628,7 +3628,7 @@ static MaybeObject* SearchRegExpMultiple( |
isolate->heap(), |
*subject, |
regexp->data(), |
- RegExpResultsCache::REGEXP_MULTIPLE_INDICES)); |
+ RegExpResultsCache::REGEXP_MULTIPLE_INDICES), isolate); |
if (*cached_answer != Smi::FromInt(0)) { |
Handle<FixedArray> cached_fixed_array = |
Handle<FixedArray>(FixedArray::cast(*cached_answer)); |
@@ -3784,7 +3784,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_RegExpExecMultiple) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToRadixString) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_SMI_ARG_CHECKED(radix, 1); |
RUNTIME_ASSERT(2 <= radix && radix <= 36); |
@@ -3820,7 +3820,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToRadixString) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToFixed) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_DOUBLE_ARG_CHECKED(value, 0); |
@@ -3836,7 +3836,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToFixed) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToExponential) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_DOUBLE_ARG_CHECKED(value, 0); |
@@ -3852,7 +3852,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToExponential) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToPrecision) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_DOUBLE_ARG_CHECKED(value, 0); |
@@ -3873,6 +3873,7 @@ static Handle<Object> GetCharAt(Handle<String> string, uint32_t index) { |
if (index < static_cast<uint32_t>(string->length())) { |
string->TryFlatten(); |
return LookupSingleCharacterStringFromCode( |
+ string->GetIsolate(), |
string->Get(index)); |
} |
return Execution::CharAt(string, index); |
@@ -3946,7 +3947,7 @@ MaybeObject* Runtime::GetObjectProperty(Isolate* isolate, |
RUNTIME_FUNCTION(MaybeObject*, Runtime_GetProperty) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
Handle<Object> object = args.at<Object>(0); |
@@ -3958,7 +3959,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetProperty) { |
// KeyedStringGetProperty is called from KeyedLoadIC::GenerateGeneric. |
RUNTIME_FUNCTION(MaybeObject*, Runtime_KeyedGetProperty) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
// Fast cases for getting named properties of the receiver JSObject |
@@ -4359,7 +4360,7 @@ MaybeObject* Runtime::ForceDeleteObjectProperty(Isolate* isolate, |
RUNTIME_FUNCTION(MaybeObject*, Runtime_SetProperty) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
RUNTIME_ASSERT(args.length() == 4 || args.length() == 5); |
Handle<Object> object = args.at<Object>(0); |
@@ -4398,7 +4399,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_TransitionElementsKind) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_TransitionElementsSmiToDouble) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
RUNTIME_ASSERT(args.length() == 1); |
Handle<Object> object = args.at<Object>(0); |
if (object->IsJSObject()) { |
@@ -4415,7 +4416,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_TransitionElementsSmiToDouble) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_TransitionElementsDoubleToObject) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
RUNTIME_ASSERT(args.length() == 1); |
Handle<Object> object = args.at<Object>(0); |
if (object->IsJSObject()) { |
@@ -4435,7 +4436,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_TransitionElementsDoubleToObject) { |
// This is used to decide if we should transform null and undefined |
// into the global object when doing call and apply. |
RUNTIME_FUNCTION(MaybeObject*, Runtime_SetNativeFlag) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
RUNTIME_ASSERT(args.length() == 1); |
Handle<Object> object = args.at<Object>(0); |
@@ -4538,7 +4539,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugPrepareStepInIfStepping) { |
// Set a local property, even if it is READ_ONLY. If the property does not |
// exist, it will be added with attributes NONE. |
RUNTIME_FUNCTION(MaybeObject*, Runtime_IgnoreAttributesAndSetProperty) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
RUNTIME_ASSERT(args.length() == 3 || args.length() == 4); |
CONVERT_ARG_CHECKED(JSObject, object, 0); |
CONVERT_ARG_CHECKED(String, name, 1); |
@@ -4558,7 +4559,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_IgnoreAttributesAndSetProperty) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_DeleteProperty) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 3); |
CONVERT_ARG_CHECKED(JSReceiver, object, 0); |
@@ -4577,7 +4578,7 @@ static Object* HasLocalPropertyImplementation(Isolate* isolate, |
// Handle hidden prototypes. If there's a hidden prototype above this thing |
// then we have to check it for properties, because they are supposed to |
// look like they are on this object. |
- Handle<Object> proto(object->GetPrototype()); |
+ Handle<Object> proto(object->GetPrototype(), isolate); |
if (proto->IsJSObject() && |
Handle<JSObject>::cast(proto)->map()->is_hidden_prototype()) { |
return HasLocalPropertyImplementation(isolate, |
@@ -4589,7 +4590,7 @@ static Object* HasLocalPropertyImplementation(Isolate* isolate, |
RUNTIME_FUNCTION(MaybeObject*, Runtime_HasLocalProperty) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_ARG_CHECKED(String, key, 1); |
@@ -4627,7 +4628,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_HasLocalProperty) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_HasProperty) { |
- NoHandleAllocation na; |
+ NoHandleAllocation na(isolate); |
ASSERT(args.length() == 2); |
CONVERT_ARG_CHECKED(JSReceiver, receiver, 0); |
CONVERT_ARG_CHECKED(String, key, 1); |
@@ -4639,7 +4640,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_HasProperty) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_HasElement) { |
- NoHandleAllocation na; |
+ NoHandleAllocation na(isolate); |
ASSERT(args.length() == 2); |
CONVERT_ARG_CHECKED(JSReceiver, receiver, 0); |
CONVERT_SMI_ARG_CHECKED(index, 1); |
@@ -4651,7 +4652,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_HasElement) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_IsPropertyEnumerable) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_ARG_CHECKED(JSObject, object, 0); |
@@ -4881,7 +4882,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_LocalKeys) { |
return *isolate->factory()->NewJSArray(0); |
} |
- Handle<Object> proto(object->GetPrototype()); |
+ Handle<Object> proto(object->GetPrototype(), isolate); |
// If proxy is detached we simply return an empty array. |
if (proto->IsNull()) return *isolate->factory()->NewJSArray(0); |
object = Handle<JSObject>::cast(proto); |
@@ -4915,7 +4916,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_LocalKeys) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_GetArgumentsProperty) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
// Compute the frame holding the arguments. |
@@ -4977,7 +4978,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_ToFastProperties) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_ToBool) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
return args[0]->ToBoolean(); |
@@ -4987,7 +4988,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_ToBool) { |
// Returns the type string of a value; see ECMA-262, 11.4.3 (p 47). |
// Possible optimizations: put the type string into the oddballs. |
RUNTIME_FUNCTION(MaybeObject*, Runtime_Typeof) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
Object* obj = args[0]; |
if (obj->IsNumber()) return isolate->heap()->number_symbol(); |
@@ -5049,7 +5050,7 @@ static int ParseDecimalInteger(const uint8_t*s, int from, int to) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_StringToNumber) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
CONVERT_ARG_CHECKED(String, subject, 0); |
subject->TryFlatten(); |
@@ -5161,7 +5162,7 @@ static bool IsNotEscaped(uint16_t character) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_URIEscape) { |
const char hex_chars[] = "0123456789ABCDEF"; |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
CONVERT_ARG_CHECKED(String, source, 0); |
@@ -5279,7 +5280,7 @@ static inline int Unescape(String* source, |
RUNTIME_FUNCTION(MaybeObject*, Runtime_URIUnescape) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
CONVERT_ARG_CHECKED(String, source, 0); |
@@ -5537,7 +5538,7 @@ static MaybeObject* QuoteJsonString(Isolate* isolate, |
RUNTIME_FUNCTION(MaybeObject*, Runtime_QuoteJSONString) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
CONVERT_ARG_CHECKED(String, str, 0); |
if (!str->IsFlat()) { |
MaybeObject* try_flatten = str->TryFlatten(); |
@@ -5562,7 +5563,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_QuoteJSONString) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_QuoteJSONStringComma) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
CONVERT_ARG_CHECKED(String, str, 0); |
if (!str->IsFlat()) { |
MaybeObject* try_flatten = str->TryFlatten(); |
@@ -5640,7 +5641,7 @@ static MaybeObject* QuoteJsonStringArray(Isolate* isolate, |
RUNTIME_FUNCTION(MaybeObject*, Runtime_QuoteJSONStringArray) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
CONVERT_ARG_CHECKED(JSArray, array, 0); |
@@ -5687,12 +5688,12 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_BasicJSONStringify) { |
ASSERT(args.length() == 1); |
HandleScope scope(isolate); |
BasicJsonStringifier stringifier(isolate); |
- return stringifier.Stringify(Handle<Object>(args[0])); |
+ return stringifier.Stringify(Handle<Object>(args[0], isolate)); |
} |
RUNTIME_FUNCTION(MaybeObject*, Runtime_StringParseInt) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
CONVERT_ARG_CHECKED(String, s, 0); |
CONVERT_SMI_ARG_CHECKED(radix, 1); |
@@ -5706,7 +5707,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringParseInt) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_StringParseFloat) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
CONVERT_ARG_CHECKED(String, str, 0); |
// ECMA-262 section 15.1.2.3, empty string is NaN |
@@ -5986,7 +5987,7 @@ MUST_USE_RESULT static MaybeObject* ConvertCase( |
Arguments args, |
Isolate* isolate, |
unibrow::Mapping<typename ConvertTraits::UnibrowConverter, 128>* mapping) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
CONVERT_ARG_CHECKED(String, s, 0); |
s = s->TryFlattenGetString(); |
@@ -6061,7 +6062,7 @@ static inline bool IsTrimWhiteSpace(unibrow::uchar c) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_StringTrim) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 3); |
CONVERT_ARG_CHECKED(String, s, 0); |
@@ -6100,11 +6101,12 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringSplit) { |
RUNTIME_ASSERT(pattern_length > 0); |
if (limit == 0xffffffffu) { |
- Handle<Object> cached_answer(RegExpResultsCache::Lookup( |
- isolate->heap(), |
- *subject, |
- *pattern, |
- RegExpResultsCache::STRING_SPLIT_SUBSTRINGS)); |
+ Handle<Object> cached_answer( |
+ RegExpResultsCache::Lookup(isolate->heap(), |
+ *subject, |
+ *pattern, |
+ RegExpResultsCache::STRING_SPLIT_SUBSTRINGS), |
+ isolate); |
if (*cached_answer != Smi::FromInt(0)) { |
// The cache FixedArray is a COW-array and can therefore be reused. |
Handle<JSArray> result = |
@@ -6250,7 +6252,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringToArray) { |
elements = isolate->factory()->NewFixedArray(length); |
} |
for (int i = position; i < length; ++i) { |
- Handle<Object> str = LookupSingleCharacterStringFromCode(s->Get(i)); |
+ Handle<Object> str = |
+ LookupSingleCharacterStringFromCode(isolate, s->Get(i)); |
elements->set(i, *str); |
} |
@@ -6265,7 +6268,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringToArray) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NewStringWrapper) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
CONVERT_ARG_CHECKED(String, value, 0); |
return value->ToObject(); |
@@ -6280,7 +6283,7 @@ bool Runtime::IsUpperCaseChar(RuntimeState* runtime_state, uint16_t ch) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToString) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
Object* number = args[0]; |
@@ -6291,7 +6294,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToString) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToStringSkipCache) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
Object* number = args[0]; |
@@ -6302,7 +6305,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToStringSkipCache) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToInteger) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
CONVERT_DOUBLE_ARG_CHECKED(number, 0); |
@@ -6316,7 +6319,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToInteger) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToIntegerMapMinusZero) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
CONVERT_DOUBLE_ARG_CHECKED(number, 0); |
@@ -6335,7 +6338,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToIntegerMapMinusZero) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToJSUint32) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
CONVERT_NUMBER_CHECKED(int32_t, number, Uint32, args[0]); |
@@ -6344,7 +6347,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToJSUint32) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToJSInt32) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
CONVERT_DOUBLE_ARG_CHECKED(number, 0); |
@@ -6360,7 +6363,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToJSInt32) { |
// Converts a Number to a Smi, if possible. Returns NaN if the number is not |
// a small integer. |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToSmi) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
Object* obj = args[0]; |
@@ -6379,14 +6382,14 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToSmi) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_AllocateHeapNumber) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 0); |
return isolate->heap()->AllocateHeapNumber(0); |
} |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberAdd) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_DOUBLE_ARG_CHECKED(x, 0); |
@@ -6396,7 +6399,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberAdd) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberSub) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_DOUBLE_ARG_CHECKED(x, 0); |
@@ -6406,7 +6409,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberSub) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberMul) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_DOUBLE_ARG_CHECKED(x, 0); |
@@ -6416,7 +6419,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberMul) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberUnaryMinus) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
CONVERT_DOUBLE_ARG_CHECKED(x, 0); |
@@ -6425,7 +6428,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberUnaryMinus) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberAlloc) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 0); |
return isolate->heap()->NumberFromDouble(9876543210.0); |
@@ -6433,7 +6436,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberAlloc) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberDiv) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_DOUBLE_ARG_CHECKED(x, 0); |
@@ -6443,7 +6446,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberDiv) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberMod) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_DOUBLE_ARG_CHECKED(x, 0); |
@@ -6456,7 +6459,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberMod) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_StringAdd) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_ARG_CHECKED(String, str1, 0); |
CONVERT_ARG_CHECKED(String, str2, 1); |
@@ -6505,7 +6508,7 @@ static inline void StringBuilderConcatHelper(String* special, |
RUNTIME_FUNCTION(MaybeObject*, Runtime_StringBuilderConcat) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 3); |
CONVERT_ARG_CHECKED(JSArray, array, 0); |
if (!args[1]->IsSmi()) { |
@@ -6622,7 +6625,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringBuilderConcat) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_StringBuilderJoin) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 3); |
CONVERT_ARG_CHECKED(JSArray, array, 0); |
if (!args[1]->IsSmi()) { |
@@ -6747,7 +6750,7 @@ static void JoinSparseArrayWithSeparator(FixedArray* elements, |
RUNTIME_FUNCTION(MaybeObject*, Runtime_SparseJoinWithSeparator) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 3); |
CONVERT_ARG_CHECKED(JSArray, elements_array, 0); |
RUNTIME_ASSERT(elements_array->HasFastSmiOrObjectElements()); |
@@ -6843,7 +6846,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_SparseJoinWithSeparator) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberOr) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_NUMBER_CHECKED(int32_t, x, Int32, args[0]); |
@@ -6853,7 +6856,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberOr) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberAnd) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_NUMBER_CHECKED(int32_t, x, Int32, args[0]); |
@@ -6863,7 +6866,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberAnd) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberXor) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_NUMBER_CHECKED(int32_t, x, Int32, args[0]); |
@@ -6873,7 +6876,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberXor) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberNot) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
CONVERT_NUMBER_CHECKED(int32_t, x, Int32, args[0]); |
@@ -6882,7 +6885,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberNot) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberShl) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_NUMBER_CHECKED(int32_t, x, Int32, args[0]); |
@@ -6892,7 +6895,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberShl) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberShr) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_NUMBER_CHECKED(uint32_t, x, Uint32, args[0]); |
@@ -6902,7 +6905,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberShr) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberSar) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_NUMBER_CHECKED(int32_t, x, Int32, args[0]); |
@@ -6912,7 +6915,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberSar) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberEquals) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_DOUBLE_ARG_CHECKED(x, 0); |
@@ -6931,7 +6934,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberEquals) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_StringEquals) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_ARG_CHECKED(String, x, 0); |
@@ -6949,7 +6952,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringEquals) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberCompare) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 3); |
CONVERT_DOUBLE_ARG_CHECKED(x, 0); |
@@ -6964,7 +6967,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberCompare) { |
// Compare two Smis as if they were converted to strings and then |
// compared lexicographically. |
RUNTIME_FUNCTION(MaybeObject*, Runtime_SmiLexicographicCompare) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_SMI_ARG_CHECKED(x_value, 0); |
CONVERT_SMI_ARG_CHECKED(y_value, 1); |
@@ -7102,7 +7105,7 @@ static Object* FlatStringCompare(String* x, String* y) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_StringCompare) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_ARG_CHECKED(String, x, 0); |
@@ -7137,7 +7140,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringCompare) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_acos) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
isolate->counters()->math_acos()->Increment(); |
@@ -7147,7 +7150,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_acos) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_asin) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
isolate->counters()->math_asin()->Increment(); |
@@ -7157,7 +7160,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_asin) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_atan) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
isolate->counters()->math_atan()->Increment(); |
@@ -7170,7 +7173,7 @@ static const double kPiDividedBy4 = 0.78539816339744830962; |
RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_atan2) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
isolate->counters()->math_atan2()->Increment(); |
@@ -7193,7 +7196,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_atan2) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_ceil) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
isolate->counters()->math_ceil()->Increment(); |
@@ -7203,7 +7206,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_ceil) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_cos) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
isolate->counters()->math_cos()->Increment(); |
@@ -7213,7 +7216,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_cos) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_exp) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
isolate->counters()->math_exp()->Increment(); |
@@ -7224,7 +7227,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_exp) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_floor) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
isolate->counters()->math_floor()->Increment(); |
@@ -7234,7 +7237,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_floor) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_log) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
isolate->counters()->math_log()->Increment(); |
@@ -7245,7 +7248,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_log) { |
// Slow version of Math.pow. We check for fast paths for special cases. |
// Used if SSE2/VFP3 is not available. |
RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_pow) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
isolate->counters()->math_pow()->Increment(); |
@@ -7279,7 +7282,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_pow) { |
// Fast version of Math.pow if we know that y is not an integer and y is not |
// -0.5 or 0.5. Used as slow case from full codegen. |
RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_pow_cfunction) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
isolate->counters()->math_pow()->Increment(); |
@@ -7296,7 +7299,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_pow_cfunction) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_RoundNumber) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
isolate->counters()->math_round()->Increment(); |
@@ -7339,7 +7342,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_RoundNumber) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_sin) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
isolate->counters()->math_sin()->Increment(); |
@@ -7349,7 +7352,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_sin) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_sqrt) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
isolate->counters()->math_sqrt()->Increment(); |
@@ -7359,7 +7362,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_sqrt) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_tan) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
isolate->counters()->math_tan()->Increment(); |
@@ -7369,7 +7372,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_tan) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_DateMakeDay) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_SMI_ARG_CHECKED(year, 0); |
@@ -7512,7 +7515,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NewArgumentsFast) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NewStrictArgumentsFast) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 3); |
JSFunction* callee = JSFunction::cast(args[0]); |
@@ -7592,7 +7595,7 @@ static SmartArrayPointer<Handle<Object> > GetCallerArguments( |
SmartArrayPointer<Handle<Object> > param_data( |
NewArray<Handle<Object> >(*total_argc)); |
for (int i = 0; i < args_count; i++) { |
- Handle<Object> val = args_slots[i].GetValue(); |
+ Handle<Object> val = args_slots[i].GetValue(isolate); |
param_data[prefix_argc + i] = val; |
} |
@@ -7608,7 +7611,7 @@ static SmartArrayPointer<Handle<Object> > GetCallerArguments( |
SmartArrayPointer<Handle<Object> > param_data( |
NewArray<Handle<Object> >(*total_argc)); |
for (int i = 0; i < args_count; i++) { |
- Handle<Object> val = Handle<Object>(frame->GetParameter(i)); |
+ Handle<Object> val = Handle<Object>(frame->GetParameter(i), isolate); |
param_data[prefix_argc + i] = val; |
} |
return param_data; |
@@ -7645,7 +7648,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionBindArguments) { |
JSFunction::cast(*bindee)->function_bindings()); |
new_bindings = |
isolate->factory()->NewFixedArray(old_bindings->length() + argc); |
- bindee = Handle<Object>(old_bindings->get(JSFunction::kBoundFunctionIndex)); |
+ bindee = Handle<Object>(old_bindings->get(JSFunction::kBoundFunctionIndex), |
+ isolate); |
i = 0; |
for (int n = old_bindings->length(); i < n; i++) { |
new_bindings->set(i, old_bindings->get(i)); |
@@ -7704,7 +7708,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NewObjectFromBound) { |
Handle<FixedArray>(FixedArray::cast(function->function_bindings())); |
int bound_argc = bound_args->length() - JSFunction::kBoundArgumentsStartIndex; |
Handle<Object> bound_function( |
- JSReceiver::cast(bound_args->get(JSFunction::kBoundFunctionIndex))); |
+ JSReceiver::cast(bound_args->get(JSFunction::kBoundFunctionIndex)), |
+ isolate); |
ASSERT(!bound_function->IsJSFunction() || |
!Handle<JSFunction>::cast(bound_function)->shared()->bound()); |
@@ -7713,7 +7718,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NewObjectFromBound) { |
GetCallerArguments(isolate, bound_argc, &total_argc); |
for (int i = 0; i < bound_argc; i++) { |
param_data[i] = Handle<Object>(bound_args->get( |
- JSFunction::kBoundArgumentsStartIndex + i)); |
+ JSFunction::kBoundArgumentsStartIndex + i), isolate); |
} |
if (!bound_function->IsJSFunction()) { |
@@ -8287,12 +8292,12 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_Call) { |
MaybeObject* maybe = args[1 + i]; |
Object* object; |
if (!maybe->To<Object>(&object)) return maybe; |
- argv[i] = Handle<Object>(object); |
+ argv[i] = Handle<Object>(object, isolate); |
} |
bool threw; |
Handle<JSReceiver> hfun(fun); |
- Handle<Object> hreceiver(receiver); |
+ Handle<Object> hreceiver(receiver, isolate); |
Handle<Object> result = |
Execution::Call(hfun, hreceiver, argc, argv, &threw, true); |
@@ -8353,7 +8358,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetConstructorDelegate) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NewGlobalContext) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
CONVERT_ARG_CHECKED(JSFunction, function, 0); |
@@ -8373,7 +8378,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NewGlobalContext) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_NewFunctionContext) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
CONVERT_ARG_CHECKED(JSFunction, function, 0); |
@@ -8390,7 +8395,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NewFunctionContext) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_PushWithContext) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
JSObject* extension_object; |
if (args[0]->IsJSObject()) { |
@@ -8434,7 +8439,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_PushWithContext) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_PushCatchContext) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 3); |
String* name = String::cast(args[0]); |
Object* thrown_object = args[1]; |
@@ -8460,7 +8465,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_PushCatchContext) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_PushBlockContext) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 2); |
ScopeInfo* scope_info = ScopeInfo::cast(args[0]); |
JSFunction* function; |
@@ -8735,9 +8740,11 @@ static ObjectPair LoadContextSlotHelper(Arguments args, |
Handle<JSObject> object = Handle<JSObject>::cast(holder); |
ASSERT(object->HasProperty(*name)); |
// GetProperty below can cause GC. |
- Handle<Object> receiver_handle(object->IsGlobalObject() |
+ Handle<Object> receiver_handle( |
+ object->IsGlobalObject() |
? GlobalObject::cast(*object)->global_receiver() |
Michael Starzinger
2013/02/25 10:50:58
Can we indent line three and four here?
Sven Panne
2013/02/25 14:44:43
Done.
|
- : ComputeReceiverForNonGlobal(isolate, *object)); |
+ : ComputeReceiverForNonGlobal(isolate, *object), |
+ isolate); |
// No need to unhole the value here. This is taken care of by the |
// GetProperty function. |
@@ -8903,7 +8910,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StackGuard) { |
// First check if this is a real stack overflow. |
if (isolate->stack_guard()->IsStackOverflow()) { |
- NoHandleAllocation na; |
+ NoHandleAllocation na(isolate); |
return isolate->StackOverflow(); |
} |
@@ -8948,21 +8955,21 @@ static void PrintTransition(Isolate* isolate, Object* result) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_TraceEnter) { |
ASSERT(args.length() == 0); |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
PrintTransition(isolate, NULL); |
return isolate->heap()->undefined_value(); |
} |
RUNTIME_FUNCTION(MaybeObject*, Runtime_TraceExit) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
PrintTransition(isolate, args[0]); |
return args[0]; // return TOS |
} |
RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugPrint) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
#ifdef DEBUG |
@@ -8994,14 +9001,14 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugPrint) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugTrace) { |
ASSERT(args.length() == 0); |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
isolate->PrintStack(); |
return isolate->heap()->undefined_value(); |
} |
RUNTIME_FUNCTION(MaybeObject*, Runtime_DateCurrentTime) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 0); |
// According to ECMA-262, section 15.9.1, page 117, the precision of |
@@ -9053,7 +9060,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DateParseString) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_DateLocalTimezone) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
CONVERT_DOUBLE_ARG_CHECKED(x, 0); |
@@ -9064,7 +9071,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DateLocalTimezone) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_DateToUTC) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
CONVERT_DOUBLE_ARG_CHECKED(x, 0); |
@@ -9369,7 +9376,7 @@ class ArrayConcatVisitor { |
uint32_t current_length = static_cast<uint32_t>(current_storage->length()); |
for (uint32_t i = 0; i < current_length; i++) { |
HandleScope loop_scope(isolate_); |
- Handle<Object> element(current_storage->get(i)); |
+ Handle<Object> element(current_storage->get(i), isolate_); |
if (!element->IsTheHole()) { |
Handle<SeededNumberDictionary> new_storage = |
isolate_->factory()->DictionaryAtNumberPut(slow_storage, i, element); |
@@ -9442,7 +9449,7 @@ static uint32_t EstimateElementCount(Handle<JSArray> array) { |
SeededNumberDictionary::cast(array->elements())); |
int capacity = dictionary->Capacity(); |
for (int i = 0; i < capacity; i++) { |
- Handle<Object> key(dictionary->KeyAt(i)); |
+ Handle<Object> key(dictionary->KeyAt(i), array->GetIsolate()); |
if (dictionary->IsKey(*key)) { |
element_count++; |
} |
@@ -9484,7 +9491,8 @@ static void IterateExternalArrayElements(Isolate* isolate, |
if (elements_are_guaranteed_smis) { |
for (uint32_t j = 0; j < len; j++) { |
HandleScope loop_scope(isolate); |
- Handle<Smi> e(Smi::FromInt(static_cast<int>(array->get_scalar(j)))); |
+ Handle<Smi> e(Smi::FromInt(static_cast<int>(array->get_scalar(j))), |
+ isolate); |
visitor->visit(j, e); |
} |
} else { |
@@ -9492,7 +9500,7 @@ static void IterateExternalArrayElements(Isolate* isolate, |
HandleScope loop_scope(isolate); |
int64_t val = static_cast<int64_t>(array->get_scalar(j)); |
if (Smi::IsValid(static_cast<intptr_t>(val))) { |
- Handle<Smi> e(Smi::FromInt(static_cast<int>(val))); |
+ Handle<Smi> e(Smi::FromInt(static_cast<int>(val)), isolate); |
visitor->visit(j, e); |
} else { |
Handle<Object> e = |
@@ -9522,6 +9530,7 @@ static int compareUInt32(const uint32_t* ap, const uint32_t* bp) { |
static void CollectElementIndices(Handle<JSObject> object, |
uint32_t range, |
List<uint32_t>* indices) { |
+ Isolate* isolate = object->GetIsolate(); |
ElementsKind kind = object->GetElementsKind(); |
switch (kind) { |
case FAST_SMI_ELEMENTS: |
@@ -9549,8 +9558,8 @@ static void CollectElementIndices(Handle<JSObject> object, |
SeededNumberDictionary::cast(object->elements())); |
uint32_t capacity = dict->Capacity(); |
for (uint32_t j = 0; j < capacity; j++) { |
- HandleScope loop_scope(object->GetIsolate()); |
- Handle<Object> k(dict->KeyAt(j)); |
+ HandleScope loop_scope(isolate); |
+ Handle<Object> k(dict->KeyAt(j), isolate); |
if (dict->IsKey(*k)) { |
ASSERT(k->IsNumber()); |
uint32_t index = static_cast<uint32_t>(k->Number()); |
@@ -9629,7 +9638,7 @@ static void CollectElementIndices(Handle<JSObject> object, |
} |
} |
- Handle<Object> prototype(object->GetPrototype()); |
+ Handle<Object> prototype(object->GetPrototype(), isolate); |
if (prototype->IsJSObject()) { |
// The prototype will usually have no inherited element indices, |
// but we have to check. |
@@ -9728,7 +9737,7 @@ static bool IterateElements(Isolate* isolate, |
Handle<ExternalPixelArray> pixels(ExternalPixelArray::cast( |
receiver->elements())); |
for (uint32_t j = 0; j < length; j++) { |
- Handle<Smi> e(Smi::FromInt(pixels->get_scalar(j))); |
+ Handle<Smi> e(Smi::FromInt(pixels->get_scalar(j)), isolate); |
visitor->visit(j, e); |
} |
break; |
@@ -9808,7 +9817,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_ArrayConcat) { |
uint32_t estimate_nof_elements = 0; |
for (int i = 0; i < argument_count; i++) { |
HandleScope loop_scope(isolate); |
- Handle<Object> obj(elements->get(i)); |
+ Handle<Object> obj(elements->get(i), isolate); |
uint32_t length_estimate; |
uint32_t element_estimate; |
if (obj->IsJSArray()) { |
@@ -9863,7 +9872,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_ArrayConcat) { |
int j = 0; |
bool failure = false; |
for (int i = 0; i < argument_count; i++) { |
- Handle<Object> obj(elements->get(i)); |
+ Handle<Object> obj(elements->get(i), isolate); |
if (obj->IsSmi()) { |
double_storage->set(j, Smi::cast(*obj)->value()); |
j++; |
@@ -9940,7 +9949,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_ArrayConcat) { |
ArrayConcatVisitor visitor(isolate, storage, fast_case); |
for (int i = 0; i < argument_count; i++) { |
- Handle<Object> obj(elements->get(i)); |
+ Handle<Object> obj(elements->get(i), isolate); |
if (obj->IsJSArray()) { |
Handle<JSArray> array = Handle<JSArray>::cast(obj); |
if (!IterateElements(isolate, array, &visitor)) { |
@@ -9959,7 +9968,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_ArrayConcat) { |
// This will not allocate (flatten the string), but it may run |
// very slowly for very deeply nested ConsStrings. For debugging use only. |
RUNTIME_FUNCTION(MaybeObject*, Runtime_GlobalPrint) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
CONVERT_ARG_CHECKED(String, string, 0); |
@@ -10811,9 +10820,10 @@ static Handle<JSObject> MaterializeLocalScopeWithFrameInspector( |
// First fill all parameters. |
for (int i = 0; i < scope_info->ParameterCount(); ++i) { |
- Handle<Object> value( |
- i < frame_inspector->GetParametersCount() ? |
- frame_inspector->GetParameter(i) : isolate->heap()->undefined_value()); |
+ Handle<Object> value(i < frame_inspector->GetParametersCount() |
+ ? frame_inspector->GetParameter(i) |
Michael Starzinger
2013/02/25 10:50:58
Can we indent line two and three here?
Sven Panne
2013/02/25 14:44:43
Done.
|
+ : isolate->heap()->undefined_value(), |
+ isolate); |
RETURN_IF_EMPTY_HANDLE_VALUE( |
isolate, |
@@ -10833,7 +10843,7 @@ static Handle<JSObject> MaterializeLocalScopeWithFrameInspector( |
SetProperty(isolate, |
local_scope, |
Handle<String>(scope_info->StackLocalName(i)), |
- Handle<Object>(frame_inspector->GetExpression(i)), |
+ Handle<Object>(frame_inspector->GetExpression(i), isolate), |
NONE, |
kNonStrictMode), |
Handle<JSObject>()); |
@@ -10868,7 +10878,7 @@ static Handle<JSObject> MaterializeLocalScopeWithFrameInspector( |
SetProperty(isolate, |
local_scope, |
key, |
- GetProperty(ext, key), |
+ GetProperty(isolate, ext, key), |
NONE, |
kNonStrictMode), |
Handle<JSObject>()); |
@@ -11019,7 +11029,7 @@ static Handle<JSObject> MaterializeClosure(Isolate* isolate, |
SetProperty(isolate, |
closure_scope, |
key, |
- GetProperty(ext, key), |
+ GetProperty(isolate, ext, key), |
NONE, |
kNonStrictMode), |
Handle<JSObject>()); |
@@ -11072,7 +11082,8 @@ static Handle<JSObject> MaterializeCatchScope(Isolate* isolate, |
Handle<Context> context) { |
ASSERT(context->IsCatchContext()); |
Handle<String> name(String::cast(context->extension())); |
- Handle<Object> thrown_object(context->get(Context::THROWN_OBJECT_INDEX)); |
+ Handle<Object> thrown_object(context->get(Context::THROWN_OBJECT_INDEX), |
+ isolate); |
Handle<JSObject> catch_scope = |
isolate->factory()->NewJSObject(isolate->object_function()); |
RETURN_IF_EMPTY_HANDLE_VALUE( |
@@ -11429,7 +11440,7 @@ class ScopeIterator { |
if (!CurrentContext().is_null()) { |
CurrentContext()->Print(); |
if (CurrentContext()->has_extension()) { |
- Handle<Object> extension(CurrentContext()->extension()); |
+ Handle<Object> extension(CurrentContext()->extension(), isolate_); |
if (extension->IsJSContextExtensionObject()) { |
extension->Print(); |
} |
@@ -11453,7 +11464,7 @@ class ScopeIterator { |
PrintF("Closure:\n"); |
CurrentContext()->Print(); |
if (CurrentContext()->has_extension()) { |
- Handle<Object> extension(CurrentContext()->extension()); |
+ Handle<Object> extension(CurrentContext()->extension(), isolate_); |
if (extension->IsJSContextExtensionObject()) { |
extension->Print(); |
} |
@@ -11992,7 +12003,8 @@ static Handle<Context> CopyNestedScopeContextChain(Isolate* isolate, |
if (scope_info->Type() == CATCH_SCOPE) { |
Handle<String> name(String::cast(current->extension())); |
- Handle<Object> thrown_object(current->get(Context::THROWN_OBJECT_INDEX)); |
+ Handle<Object> thrown_object(current->get(Context::THROWN_OBJECT_INDEX), |
+ isolate); |
context = |
isolate->factory()->NewCatchContext(function, |
context, |
@@ -12100,7 +12112,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugEvaluate) { |
CONVERT_NUMBER_CHECKED(int, inlined_jsframe_index, Int32, args[2]); |
CONVERT_ARG_HANDLE_CHECKED(String, source, 3); |
CONVERT_BOOLEAN_ARG_CHECKED(disable_break, 4); |
- Handle<Object> additional_context(args[5]); |
+ Handle<Object> additional_context(args[5], isolate); |
// Handle the processing of break. |
DisableBreak disable_break_save(disable_break); |
@@ -12260,7 +12272,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugEvaluateGlobal) { |
} |
CONVERT_ARG_HANDLE_CHECKED(String, source, 1); |
CONVERT_BOOLEAN_ARG_CHECKED(disable_break, 2); |
- Handle<Object> additional_context(args[3]); |
+ Handle<Object> additional_context(args[3], isolate); |
// Handle the processing of break. |
DisableBreak disable_break_save(disable_break); |
@@ -12352,7 +12364,7 @@ static int DebugReferencedBy(HeapIterator* iterator, |
Object* instance_filter, int max_references, |
FixedArray* instances, int instances_size, |
JSFunction* arguments_function) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(target->GetIsolate()); |
AssertNoAllocation no_alloc; |
// Iterate the heap. |
@@ -12629,7 +12641,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugDisassembleConstructor) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionGetInferredName) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
ASSERT(args.length() == 1); |
CONVERT_ARG_CHECKED(JSFunction, f, 0); |
@@ -13006,14 +13018,14 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetHeapUsage) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_ProfilerResume) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
v8::V8::ResumeProfiler(); |
return isolate->heap()->undefined_value(); |
} |
RUNTIME_FUNCTION(MaybeObject*, Runtime_ProfilerPause) { |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
v8::V8::PauseProfiler(); |
return isolate->heap()->undefined_value(); |
} |
@@ -13135,7 +13147,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_SetOverflowedStackTrace) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_GetV8Version) { |
ASSERT_EQ(args.length(), 0); |
- NoHandleAllocation ha; |
+ NoHandleAllocation ha(isolate); |
const char* version_string = v8::V8::GetVersion(); |
@@ -13201,13 +13213,14 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetFromCache) { |
HandleScope scope(isolate); |
Handle<JSFunctionResultCache> cache_handle(cache); |
- Handle<Object> key_handle(key); |
+ Handle<Object> key_handle(key, isolate); |
Handle<Object> value; |
{ |
Handle<JSFunction> factory(JSFunction::cast( |
cache_handle->get(JSFunctionResultCache::kFactoryIndex))); |
// TODO(antonm): consider passing a receiver when constructing a cache. |
- Handle<Object> receiver(isolate->native_context()->global_object()); |
+ Handle<Object> receiver(isolate->native_context()->global_object(), |
+ isolate); |
// This handle is nor shared, nor used later, so it's safe. |
Handle<Object> argv[] = { key_handle }; |
bool pending_exception; |