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

Unified Diff: third_party/WebKit/Source/devtools/front_end/formatter_worker/FormatterWorker.js

Issue 1912973002: [DevTools] JSONView parsing smarter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
Index: third_party/WebKit/Source/devtools/front_end/formatter_worker/FormatterWorker.js
diff --git a/third_party/WebKit/Source/devtools/front_end/formatter_worker/FormatterWorker.js b/third_party/WebKit/Source/devtools/front_end/formatter_worker/FormatterWorker.js
index 7d0c09fa8ba8c9b2700c56886e12f207f059755e..b7c5227125f65e68446d940cad7340a2127a8f03 100644
--- a/third_party/WebKit/Source/devtools/front_end/formatter_worker/FormatterWorker.js
+++ b/third_party/WebKit/Source/devtools/front_end/formatter_worker/FormatterWorker.js
@@ -78,6 +78,9 @@ self.onmessage = function(event) {
case "evaluatableJavaScriptSubstring":
WebInspector.evaluatableJavaScriptSubstring(params.content);
break;
+ case "relaxedJSONParser":
+ WebInspector.relaxedJSONParser(params.content);
+ break;
default:
console.error("Unsupport method name: " + method);
}
@@ -86,6 +89,14 @@ self.onmessage = function(event) {
/**
* @param {string} content
*/
+WebInspector.relaxedJSONParser = function(content)
+{
+ postMessage(WebInspector.RelaxedJSONParser.parse(content));
+}
+
+/**
+ * @param {string} content
+ */
WebInspector.evaluatableJavaScriptSubstring = function(content)
{
var tokenizer = acorn.tokenizer(content, {ecmaVersion: 6});

Powered by Google App Engine
This is Rietveld 408576698