Reviewers: vogelheim,

Description:
Catch graceful failures when deserializing in d8.

[email protected]

Please review this at https://codereview.chromium.org/917653002/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+4, -2 lines):
  M src/d8.cc


Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index 943855bcedc6b85f757a14255394e707816622b8..b199ef99e9fcf9a59e2af4f58cdd8e9fbb1c510e 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -242,8 +242,10 @@ Local<UnboundScript> Shell::CompileString(
     DCHECK(false);  // A new compile option?
   }
   if (data == NULL) compile_options = ScriptCompiler::kNoCompileOptions;
-  return ScriptCompiler::CompileUnbound(isolate, &cached_source,
-                                        compile_options);
+  Local<UnboundScript> result =
+ ScriptCompiler::CompileUnbound(isolate, &cached_source, compile_options);
+  CHECK(data == NULL || !data->rejected);
+  return result;
 }




--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to