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

Side by Side Diff: extensions/renderer/object_backed_native_handler.cc

Issue 598173003: Run clang-modernize -use-nullptr over src/extensions/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/renderer/object_backed_native_handler.h" 5 #include "extensions/renderer/object_backed_native_handler.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/linked_ptr.h" 8 #include "base/memory/linked_ptr.h"
9 #include "extensions/renderer/console.h" 9 #include "extensions/renderer/console.h"
10 #include "extensions/renderer/module_system.h" 10 #include "extensions/renderer/module_system.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 v8::Handle<v8::Object> data = router_data_.Get(i); 83 v8::Handle<v8::Object> data = router_data_.Get(i);
84 v8::Handle<v8::Value> handler_function_value = 84 v8::Handle<v8::Value> handler_function_value =
85 data->Get(v8::String::NewFromUtf8(isolate, kHandlerFunction)); 85 data->Get(v8::String::NewFromUtf8(isolate, kHandlerFunction));
86 CHECK(!handler_function_value.IsEmpty()); 86 CHECK(!handler_function_value.IsEmpty());
87 delete static_cast<HandlerFunction*>( 87 delete static_cast<HandlerFunction*>(
88 handler_function_value.As<v8::External>()->Value()); 88 handler_function_value.As<v8::External>()->Value());
89 data->Delete(v8::String::NewFromUtf8(isolate, kHandlerFunction)); 89 data->Delete(v8::String::NewFromUtf8(isolate, kHandlerFunction));
90 } 90 }
91 router_data_.Clear(); 91 router_data_.Clear();
92 object_template_.reset(); 92 object_template_.reset();
93 context_ = NULL; 93 context_ = nullptr;
94 NativeHandler::Invalidate(); 94 NativeHandler::Invalidate();
95 } 95 }
96 96
97 } // namespace extensions 97 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698