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

Unified Diff: src/bootstrapper.cc

Issue 223653003: Return MaybeHandle from NewExternalStringFrom*. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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/api.cc ('k') | src/factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index da70f59d2d697295d3128776fe5a6654fb4dd9ef..1da742eea6c788e7da9213de7b121c22ee78febf 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -53,10 +53,10 @@ Handle<String> Bootstrapper::NativesSourceLookup(int index) {
new NativesExternalStringResource(this,
source.start(),
source.length());
- Handle<String> source_code =
- isolate_->factory()->NewExternalStringFromAscii(resource);
// We do not expect this to throw an exception. Change this if it does.
- CHECK_NOT_EMPTY_HANDLE(isolate_, source_code);
+ Handle<String> source_code =
+ isolate_->factory()->NewExternalStringFromAscii(
+ resource).ToHandleChecked();
heap->natives_source_cache()->set(index, *source_code);
}
Handle<Object> cached_source(heap->natives_source_cache()->get(index),
@@ -2319,10 +2319,10 @@ bool Genesis::InstallExtension(Isolate* isolate,
return false;
}
}
- Handle<String> source_code =
- isolate->factory()->NewExternalStringFromAscii(extension->source());
// We do not expect this to throw an exception. Change this if it does.
- CHECK_NOT_EMPTY_HANDLE(isolate, source_code);
+ Handle<String> source_code =
+ isolate->factory()->NewExternalStringFromAscii(
+ extension->source()).ToHandleChecked();
bool result = CompileScriptCached(isolate,
CStrVector(extension->name()),
source_code,
« no previous file with comments | « src/api.cc ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698