From 4b1b58d816fded83df0e4c670feda18a24f66e3f Mon Sep 17 00:00:00 2001 From: xzhan96 Date: Tue, 17 Jan 2017 14:07:02 +0800 Subject: [PATCH] Fix the issue that some applications cannot be rendered The issue was brought by the fix of issue #5294. Here can fix both #5294 and #5528. BUG=5528 --- extensions/renderer/resources/app_window_custom_bindings.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/renderer/resources/app_window_custom_bindings.js b/extensions/renderer/resources/app_window_custom_bindings.js index 4cb75c0739cc1..aa51d917d8c1a 100644 --- a/extensions/renderer/resources/app_window_custom_bindings.js +++ b/extensions/renderer/resources/app_window_custom_bindings.js @@ -203,7 +203,9 @@ appWindow.registerCustomHook(function(bindingsAPI) { apiFunctions.setHandleRequest('getAll', function() { var views = runtimeNatives.GetExtensionViews(-1, -1, 'APP_WINDOW'); return $Array.map(views, function(win) { - try_nw(win).nw.Window.get(); //construct the window object for NWJS#5294 + if (win.nw) { + try_nw(win).nw.Window.get(); //construct the window object for NWJS#5294 + } return try_hidden(win).chrome.app.window.current(); }); });