Reviewers: Yang, yurys,

Message:
Yury and Yang, please take a look!

Description:
[V8] Report JSON parser script to DevTools

If JSON contains SyntaxError then V8 will report exception and won't report
script which contains that error.

BUG=515382
[email protected],[email protected]

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

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

Affected files (+4, -3 lines):
  M src/json-parser.h


Index: src/json-parser.h
diff --git a/src/json-parser.h b/src/json-parser.h
index 3ee874930411579ed88fd067237e3cd491f2ddcd..1833256a1ce25cf38677e875d5edd542e2b4fe43 100644
--- a/src/json-parser.h
+++ b/src/json-parser.h
@@ -7,6 +7,7 @@

 #include "src/char-predicates.h"
 #include "src/conversions.h"
+#include "src/debug/debug.h"
 #include "src/factory.h"
 #include "src/messages.h"
 #include "src/scanner.h"
@@ -244,9 +245,9 @@ MaybeHandle<Object> JsonParser<seq_one_byte>::ParseJson() {
         break;
     }

-    MessageLocation location(factory->NewScript(source_),
-                             position_,
-                             position_ + 1);
+    Handle<Script> script(factory->NewScript(source_));
+    isolate()->debug()->OnAfterCompile(script);
+    MessageLocation location(script, position_, position_ + 1);
     Handle<Object> error = factory->NewSyntaxError(message, argument);
     return isolate()->template Throw<Object>(error, &location);
   }


--
--
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