| Index: src/bootstrapper.cc
|
| diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
|
| index c373e52fcf31071cbb22f4df018fdc4d5f30dd3b..a9e9fe078e88b4fa5749794a7842d3ddd331eca3 100644
|
| --- a/src/bootstrapper.cc
|
| +++ b/src/bootstrapper.cc
|
| @@ -493,8 +493,7 @@ Handle<JSFunction> Genesis::CreateEmptyFunction(Isolate* isolate) {
|
| Builtins::kEmptyFunction));
|
| empty_function->set_code(*code);
|
| empty_function->shared()->set_code(*code);
|
| - Handle<String> source =
|
| - factory->NewStringFromOneByte(STATIC_ASCII_VECTOR("() {}"));
|
| + Handle<String> source = factory->NewStringFromStaticAscii("() {}");
|
| Handle<Script> script = factory->NewScript(source);
|
| script->set_type(Smi::FromInt(Script::TYPE_NATIVE));
|
| empty_function->shared()->set_script(*script);
|
| @@ -1404,10 +1403,12 @@ bool Genesis::CompileBuiltin(Isolate* isolate, int index) {
|
| bool Genesis::CompileExperimentalBuiltin(Isolate* isolate, int index) {
|
| Vector<const char> name = ExperimentalNatives::GetScriptName(index);
|
| Factory* factory = isolate->factory();
|
| - Handle<String> source_code =
|
| + Handle<String> source_code;
|
| + ASSIGN_RETURN_ON_EXCEPTION_VALUE(
|
| + isolate, source_code,
|
| factory->NewStringFromAscii(
|
| - ExperimentalNatives::GetRawScriptSource(index));
|
| - RETURN_IF_EMPTY_HANDLE_VALUE(isolate, source_code, false);
|
| + ExperimentalNatives::GetRawScriptSource(index)),
|
| + false);
|
| return CompileNative(isolate, name, source_code);
|
| }
|
|
|
| @@ -1456,8 +1457,8 @@ bool Genesis::CompileScriptCached(Isolate* isolate,
|
| // function and insert it into the cache.
|
| if (cache == NULL || !cache->Lookup(name, &function_info)) {
|
| ASSERT(source->IsOneByteRepresentation());
|
| - Handle<String> script_name = factory->NewStringFromUtf8(name);
|
| - ASSERT(!script_name.is_null());
|
| + Handle<String> script_name =
|
| + factory->NewStringFromUtf8(name).ToHandleChecked();
|
| function_info = Compiler::CompileScript(
|
| source,
|
| script_name,
|
|
|