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

Unified Diff: third_party/WebKit/Source/devtools/front_end/script_formatter_worker/ScriptFormatterWorker.js

Issue 1770263002: Devtools: resolve expressions in minified scripts with sourcemaps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 9 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/script_formatter_worker/ScriptFormatterWorker.js
diff --git a/third_party/WebKit/Source/devtools/front_end/script_formatter_worker/ScriptFormatterWorker.js b/third_party/WebKit/Source/devtools/front_end/script_formatter_worker/ScriptFormatterWorker.js
index df531442b22679bf6917ae6721001356beb29bff..eeb464974778dd434c229866824e175c5c54ddb3 100644
--- a/third_party/WebKit/Source/devtools/front_end/script_formatter_worker/ScriptFormatterWorker.js
+++ b/third_party/WebKit/Source/devtools/front_end/script_formatter_worker/ScriptFormatterWorker.js
@@ -99,8 +99,8 @@ FormatterWorker.javaScriptOutline = function(params)
var isReadingArguments = false;
var argumentsText = "";
var currentFunction = null;
- var tokenizer = new FormatterWorker.AcornTokenizer(params.content);
- var AT = FormatterWorker.AcornTokenizer;
+ var tokenizer = new WebInspector.AcornTokenizer(params.content);
+ var AT = WebInspector.AcornTokenizer;
while (tokenizer.peekToken()) {
var token = /** @type {!Acorn.TokenOrComment} */(tokenizer.nextToken());
@@ -522,3 +522,14 @@ FormatterWorker.HTMLFormatter.prototype = {
this._position = cursor;
}
}
+
+// A dummy javascript mode which is used only by htmlmixed mode to advance
+// stream until a </script> is found.
+CodeMirror.defineMode("javascript", function(config, parserConfig) {
+ return {
+ token: function(stream, state)
+ {
+ return stream.next();
+ }
+ }
+});

Powered by Google App Engine
This is Rietveld 408576698