Index: chrome/browser/extensions/window_event_router.cc |
diff --git a/chrome/browser/extensions/window_event_router.cc b/chrome/browser/extensions/window_event_router.cc |
index 427119bf35283f452b4b4b564f3ccb5de532df50..b90e04a29d6cb0a3d24da117fb57550325655913 100644 |
--- a/chrome/browser/extensions/window_event_router.cc |
+++ b/chrome/browser/extensions/window_event_router.cc |
@@ -139,11 +139,12 @@ void WindowEventRouter::OnActiveWindowChanged( |
// dispatch WINDOW_ID_NONE to extensions whose profile lost focus that |
// can't see the new focused window across the incognito boundary. |
// See crbug.com/46610. |
- scoped_ptr<base::ListValue> none_args(new ListValue()); |
+ scoped_ptr<base::ListValue> none_args(NULL); |
if (focused_profile_ != NULL && previous_focused_profile != NULL && |
focused_profile_ != previous_focused_profile) { |
- none_args->Append( |
- Value::CreateIntegerValue(extension_misc::kUnknownWindowId)); |
+ none_args.reset(new ListValue()); |
+ none_args->Append(Value::CreateIntegerValue( |
+ extension_misc::kUnknownWindowId)); |
} |
// Note that we may pass a NULL |window_profile| for the |restrict_to_profile| |