constant_properties,
should_have_fast_elements,
has_function_literal);
- if (boilerplate.is_null()) return Failure::Exception();
+ RETURN_IF_EMPTY_HANDLE(isolate, boilerplate);
// Update the functions literal and return the boilerplate.
literals->set(literals_index, *boilerplate);
}
constant_properties,
should_have_fast_elements,
has_function_literal);
- if (boilerplate.is_null()) return Failure::Exception();
+ RETURN_IF_EMPTY_HANDLE(isolate, boilerplate);
// Update the functions literal and return the boilerplate.
literals->set(literals_index, *boilerplate);
}
ASSERT(*elements != isolate->heap()->empty_fixed_array());
boilerplate =
Runtime::CreateArrayLiteralBoilerplate(isolate, literals, elements);
- if (boilerplate.is_null()) return Failure::Exception();
+ RETURN_IF_EMPTY_HANDLE(isolate, boilerplate);
// Update the functions literal and return the boilerplate.
literals->set(literals_index, *boilerplate);
}
ASSERT(*elements != isolate->heap()->empty_fixed_array());
boilerplate =
Runtime::CreateArrayLiteralBoilerplate(isolate, literals, elements);
- if (boilerplate.is_null()) return Failure::Exception();
+ RETURN_IF_EMPTY_HANDLE(isolate, boilerplate);
// Update the functions literal and return the boilerplate.
literals->set(literals_index, *boilerplate);
}
GetPrototypeSkipHiddenPrototypes(isolate, *obj), isolate);
Handle<Object> result = JSObject::SetPrototype(obj, prototype, true);
- if (result.is_null()) return Failure::Exception();
+ RETURN_IF_EMPTY_HANDLE(isolate, result);
Handle<Object> new_value(
GetPrototypeSkipHiddenPrototypes(isolate, *obj), isolate);
return *result;
}
Handle<Object> result = JSObject::SetPrototype(obj, prototype, true);
- if (result.is_null()) return Failure::Exception();
+ RETURN_IF_EMPTY_HANDLE(isolate, result);
return *result;
}
elms->set(WRITABLE_INDEX, heap->ToBoolean((attrs & READ_ONLY) == 0));
// GetProperty does access check.
Handle<Object> value = GetProperty(isolate, obj, name);
- if (value.is_null()) return Failure::Exception();
+ RETURN_IF_EMPTY_HANDLE(isolate, value);
elms->set(VALUE_INDEX, *value);
} else {
// Access checks are performed for both accessors separately.
CONVERT_ARG_HANDLE_CHECKED(String, flags, 2);
Handle<Object> result =
RegExpImpl::Compile(re, pattern, flags);
- if (result.is_null()) return Failure::Exception();
+ RETURN_IF_EMPTY_HANDLE(isolate, result);
return *result;
}
subject,
index,
last_match_info);
- if (result.is_null()) return Failure::Exception();
+ RETURN_IF_EMPTY_HANDLE(isolate, result);
return *result;
}
? ONLY_SINGLE_FUNCTION_LITERAL : NO_PARSE_RESTRICTION;
Handle<SharedFunctionInfo> shared = Compiler::CompileEval(
source, context, true, CLASSIC_MODE, restriction, RelocInfo::kNoPosition);
- if (shared.is_null()) return Failure::Exception();
+ RETURN_IF_EMPTY_HANDLE(isolate, shared);
Handle<JSFunction> fun =
isolate->factory()->NewFunctionFromSharedFunctionInfo(shared,
context,
language_mode,
NO_PARSE_RESTRICTION,
scope_position);
- if (shared.is_null()) return MakePair(Failure::Exception(), NULL);
+ RETURN_IF_EMPTY_HANDLE_VALUE(isolate, shared,
+ MakePair(Failure::Exception(), NULL));
Handle<JSFunction> compiled =
isolate->factory()->NewFunctionFromSharedFunctionInfo(
shared, context, NOT_TENURED);
CLASSIC_MODE,
NO_PARSE_RESTRICTION,
RelocInfo::kNoPosition);
- if (shared.is_null()) return Failure::Exception();
+ RETURN_IF_EMPTY_HANDLE(isolate, shared);
Handle<JSFunction> eval_fun =
isolate->factory()->NewFunctionFromSharedFunctionInfo(