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

Unified Diff: src/d8.cc

Issue 1214803004: Fix cluster-fuzz found regression in d8 Workers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: assertThrows Created 5 years, 6 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 | « no previous file | test/mjsunit/regress/regress-crbug-504729.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index e165aa47e020e377c713872c552d255ca7acf2f4..3b5accb40f4c0870caf408b124850a2fd5e62d15 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -704,6 +704,10 @@ void Shell::WorkerNew(const v8::FunctionCallbackInfo<v8::Value>& args) {
workers_.Add(worker);
String::Utf8Value function_string(args[0]->ToString());
+ if (!*function_string) {
+ Throw(args.GetIsolate(), "Function.prototype.toString failed");
+ return;
+ }
worker->StartExecuteInThread(isolate, *function_string);
}
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-504729.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698