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

Unified Diff: src/json-parser.h

Issue 1308123006: [V8] Report JSON parser script to DevTools (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/cctest/test-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/json-parser.h
diff --git a/src/json-parser.h b/src/json-parser.h
index 3ee874930411579ed88fd067237e3cd491f2ddcd..cac497985985e06f24a3848f08ba56a14b78af99 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,11 @@ MaybeHandle<Object> JsonParser<seq_one_byte>::ParseJson() {
break;
}
- MessageLocation location(factory->NewScript(source_),
- position_,
- position_ + 1);
+ Handle<Script> script(factory->NewScript(source_));
+ // We should sent compile error event because we compile JSON object in
+ // separated source file.
+ isolate()->debug()->OnCompileError(script);
+ MessageLocation location(script, position_, position_ + 1);
Handle<Object> error = factory->NewSyntaxError(message, argument);
return isolate()->template Throw<Object>(error, &location);
}
« no previous file with comments | « no previous file | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698