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

Unified Diff: Source/devtools/front_end/emulation/OverridesSupport.js

Issue 1313793005: Fixes a bug where touch device scripts were not cleared on exit of device mode in devtools. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/emulation/OverridesSupport.js
diff --git a/Source/devtools/front_end/emulation/OverridesSupport.js b/Source/devtools/front_end/emulation/OverridesSupport.js
index ddfd646967b9c4d1f89d1a6a420b8df30ee30eac..3a1588e039bb2fd015b61c5452194dec1dd7b41f 100644
--- a/Source/devtools/front_end/emulation/OverridesSupport.js
+++ b/Source/devtools/front_end/emulation/OverridesSupport.js
@@ -710,6 +710,9 @@ WebInspector.OverridesSupport.prototype = {
var symbol = WebInspector.OverridesSupport._touchEventsScriptIdSymbol;
if (emulationEnabled && target[symbol] !== -1) {
+ if (typeof target[symbol] !== "undefined")
+ target.pageAgent().removeScriptToEvaluateOnLoad(target[symbol]);
dgozman 2015/08/25 18:02:09 This is getting messy. Could you please rewrite th
+
target[symbol] = -1;
target.pageAgent().addScriptToEvaluateOnLoad("(" + injectedFunction.toString() + ")()", scriptAddedCallback);
} else {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698