| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |