Skip to content

Commit

Permalink
Revert of DevTools: Fix debug_devtools=1 mode "main" extensions loadi…
Browse files Browse the repository at this point in the history
…ng after r182328 (patchset #1 id:1 of https://codereview.chromium.org/593673002/)

Reason for revert:
Broke the following tests:
inspector/initial-modules-load.html
inspector/open-with-rendering-option-enabled.html

Original issue's description:
> DevTools: Fix debug_devtools=1 mode "main" extensions loading after r182328
> 
> R=dgozman,lushnikov
> NOTRY=true
> 
> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=182405

[email protected],[email protected],[email protected]
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/593703002

git-svn-id: svn://svn.chromium.org/blink/trunk@182409 bbb929c8-8fbe-4397-9dbb-9b2b20218538
  • Loading branch information
caseq committed Sep 22, 2014
1 parent 32594f2 commit 8733da8
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Source/devtools/front_end/Runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ Runtime.prototype = {
var content;
// FIXME: This is a temp workaround to avoid core module loading attempts in the release mode.
// It should be removed when the new application loader is implemented.
if (moduleName === "main" || !this._coreModules.hasOwnProperty(moduleName))
if (!this._coreModules.hasOwnProperty(moduleName))
content = loadResource(moduleName + "/module.json");
else
content = "{}";
Expand Down Expand Up @@ -524,11 +524,6 @@ Runtime.Module = function(manager, descriptor)
for (var i = 0; extensions && i < extensions.length; ++i)
this._manager._extensions.push(new Runtime.Extension(this, extensions[i]));
this._loaded = false;

// FIXME: This is a temp workaround to avoid core module loading attempts in the release mode.
// It should be removed when the new application loader is implemented.
if (this._manager._coreModules.hasOwnProperty(this._name))
this._loaded = true;
}

Runtime.Module.prototype = {
Expand Down Expand Up @@ -559,7 +554,10 @@ Runtime.Module.prototype = {
this._manager.loadModule(dependencies[i]);
if (this._descriptor.scripts) {
if (Runtime.isReleaseMode()) {
loadScript(this._name + ".js");
// FIXME: This is a temp workaround to avoid core module loading attempts in the release mode.
// It should be removed when the new application loader is implemented.
if (!this._manager._coreModules.hasOwnProperty(this._name))
loadScript(this._name + ".js");
} else {
var scripts = this._descriptor.scripts;
for (var i = 0; i < scripts.length; ++i)
Expand Down

0 comments on commit 8733da8

Please sign in to comment.