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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/JavaScriptCompiler.js

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month 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/sources/JavaScriptCompiler.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptCompiler.js b/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptCompiler.js
index 07c15e449e3bce17c28fc225da86834c777abaea..ba9f6fd36c6b3d51882d3f464c3cb9e9b9c49422 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptCompiler.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptCompiler.js
@@ -4,9 +4,9 @@
/**
* @unrestricted
*/
-WebInspector.JavaScriptCompiler = class {
+Sources.JavaScriptCompiler = class {
/**
- * @param {!WebInspector.JavaScriptSourceFrame} sourceFrame
+ * @param {!Sources.JavaScriptSourceFrame} sourceFrame
*/
constructor(sourceFrame) {
this._sourceFrame = sourceFrame;
@@ -20,21 +20,21 @@ WebInspector.JavaScriptCompiler = class {
}
if (this._timeout)
clearTimeout(this._timeout);
- this._timeout = setTimeout(this._compile.bind(this), WebInspector.JavaScriptCompiler.CompileDelay);
+ this._timeout = setTimeout(this._compile.bind(this), Sources.JavaScriptCompiler.CompileDelay);
}
/**
- * @return {?WebInspector.Target}
+ * @return {?SDK.Target}
*/
_findTarget() {
- var targets = WebInspector.targetManager.targets();
+ var targets = SDK.targetManager.targets();
var sourceCode = this._sourceFrame.uiSourceCode();
for (var i = 0; i < targets.length; ++i) {
- var scriptFile = WebInspector.debuggerWorkspaceBinding.scriptFile(sourceCode, targets[i]);
+ var scriptFile = Bindings.debuggerWorkspaceBinding.scriptFile(sourceCode, targets[i]);
if (scriptFile)
return targets[i];
}
- return WebInspector.targetManager.mainTarget();
+ return SDK.targetManager.mainTarget();
}
_compile() {
@@ -42,7 +42,7 @@ WebInspector.JavaScriptCompiler = class {
if (!target)
return;
var runtimeModel = target.runtimeModel;
- var currentExecutionContext = WebInspector.context.flavor(WebInspector.ExecutionContext);
+ var currentExecutionContext = UI.context.flavor(SDK.ExecutionContext);
if (!currentExecutionContext)
return;
@@ -51,10 +51,10 @@ WebInspector.JavaScriptCompiler = class {
runtimeModel.compileScript(code, '', false, currentExecutionContext.id, compileCallback.bind(this, target));
/**
- * @param {!WebInspector.Target} target
+ * @param {!SDK.Target} target
* @param {!Protocol.Runtime.ScriptId=} scriptId
* @param {?Protocol.Runtime.ExceptionDetails=} exceptionDetails
- * @this {WebInspector.JavaScriptCompiler}
+ * @this {Sources.JavaScriptCompiler}
*/
function compileCallback(target, scriptId, exceptionDetails) {
this._compiling = false;
@@ -65,9 +65,9 @@ WebInspector.JavaScriptCompiler = class {
}
if (!exceptionDetails)
return;
- var text = WebInspector.ConsoleMessage.simpleTextFromException(exceptionDetails);
+ var text = SDK.ConsoleMessage.simpleTextFromException(exceptionDetails);
this._sourceFrame.uiSourceCode().addLineMessage(
- WebInspector.UISourceCode.Message.Level.Error, text, exceptionDetails.lineNumber,
+ Workspace.UISourceCode.Message.Level.Error, text, exceptionDetails.lineNumber,
exceptionDetails.columnNumber);
this._compilationFinishedForTest();
}
@@ -77,4 +77,4 @@ WebInspector.JavaScriptCompiler = class {
}
};
-WebInspector.JavaScriptCompiler.CompileDelay = 1000;
+Sources.JavaScriptCompiler.CompileDelay = 1000;

Powered by Google App Engine
This is Rietveld 408576698