Bug 782877 - Intermittent browser_dbg_bfcache.js | uncaught JS exception - TypeError: element is undefined at debugger-controller.js:1275, r=rcampbell
This commit is contained in:
@@ -1353,6 +1353,16 @@ SourceScripts.prototype = {
|
|||||||
_onLoadSourceFinished:
|
_onLoadSourceFinished:
|
||||||
function SS__onLoadSourceFinished(aScriptUrl, aSourceText, aContentType, aOptions) {
|
function SS__onLoadSourceFinished(aScriptUrl, aSourceText, aContentType, aOptions) {
|
||||||
let element = DebuggerView.Scripts.getScriptByLocation(aScriptUrl);
|
let element = DebuggerView.Scripts.getScriptByLocation(aScriptUrl);
|
||||||
|
|
||||||
|
// Tab navigated before we got a chance to finish loading and displaying
|
||||||
|
// the source. The outcome is that the expected url is not present anymore
|
||||||
|
// in the scripts container, hence the original script object coming from
|
||||||
|
// the active thread no longer exists. There's really nothing that needs
|
||||||
|
// to be done in this case, nor something that can be currently avoided.
|
||||||
|
if (!element) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let script = element.getUserData("sourceScript");
|
let script = element.getUserData("sourceScript");
|
||||||
|
|
||||||
script.loaded = true;
|
script.loaded = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user