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

Unified Diff: third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js

Issue 1761243002: [DevTools] Fix compile errors before closure compiler roll (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prepare-bindings-module
Patch Set: Created 4 years, 10 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/emulation/DeviceModeToolbar.js
diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js
index 8f53f3ae4adb1669bb2565447044f923bb8ca6af..79c6098ad465a667674c1ff917d3029fc22e1146 100644
--- a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js
+++ b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js
@@ -401,11 +401,12 @@ WebInspector.DeviceModeToolbar.prototype = {
*/
_deviceListChanged: function()
{
- if (!this._model.device())
+ var device = this._model.device();
+ if (!device)
return;
var devices = this._allDevices();
- if (devices.indexOf(this._model.device()) === -1) {
+ if (devices.indexOf(device) === -1) {
if (devices.length)
this._emulateDevice(devices[0]);
else

Powered by Google App Engine
This is Rietveld 408576698