| 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 "bindings/core/v8/ScriptState.h" | 5 #include "bindings/core/v8/ScriptState.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/V8Binding.h" | 7 #include "bindings/core/v8/V8Binding.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 void ScriptState::DetachGlobalObject() { | 47 void ScriptState::DetachGlobalObject() { |
| 48 DCHECK(!context_.IsEmpty()); | 48 DCHECK(!context_.IsEmpty()); |
| 49 GetContext()->DetachGlobal(); | 49 GetContext()->DetachGlobal(); |
| 50 } | 50 } |
| 51 | 51 |
| 52 void ScriptState::DisposePerContextData() { | 52 void ScriptState::DisposePerContextData() { |
| 53 per_context_data_ = nullptr; | 53 per_context_data_ = nullptr; |
| 54 } | 54 } |
| 55 | 55 |
| 56 ScriptValue ScriptState::GetFromExtrasExports(const char* name) { | |
| 57 v8::HandleScope handle_scope(isolate_); | |
| 58 v8::Local<v8::Value> v8_value; | |
| 59 if (!GetContext() | |
| 60 ->GetExtrasBindingObject() | |
| 61 ->Get(GetContext(), V8AtomicString(GetIsolate(), name)) | |
| 62 .ToLocal(&v8_value)) | |
| 63 return ScriptValue(); | |
| 64 return ScriptValue(this, v8_value); | |
| 65 } | |
| 66 | |
| 67 } // namespace blink | 56 } // namespace blink |
| OLD | NEW |