| 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 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! | 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
| 6 | 6 |
| 7 #include "config.h" | 7 #include "config.h" |
| 8 #include "V8TestInterfaceCheckSecurity.h" | 8 #include "V8TestInterfaceCheckSecurity.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/BindingSecurity.h" | 10 #include "bindings/core/v8/BindingSecurity.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 static void TestInterfaceCheckSecurityForceSetAttributeOnThis(v8::Local<v8::Name
> name, v8::Local<v8::Value> v8Value, const CallbackInfo& info) | 33 static void TestInterfaceCheckSecurityForceSetAttributeOnThis(v8::Local<v8::Name
> name, v8::Local<v8::Value> v8Value, const CallbackInfo& info) |
| 34 { | 34 { |
| 35 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(info
.Holder()); | 35 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(info
.Holder()); |
| 36 v8::String::Utf8Value attributeName(name); | 36 v8::String::Utf8Value attributeName(name); |
| 37 ExceptionState exceptionState(ExceptionState::SetterContext, *attributeName,
"TestInterfaceCheckSecurity", info.Holder(), info.GetIsolate()); | 37 ExceptionState exceptionState(ExceptionState::SetterContext, *attributeName,
"TestInterfaceCheckSecurity", info.Holder(), info.GetIsolate()); |
| 38 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), exceptionState)) { | 38 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), exceptionState)) { |
| 39 exceptionState.throwIfNeeded(); | 39 exceptionState.throwIfNeeded(); |
| 40 return; | 40 return; |
| 41 } | 41 } |
| 42 ASSERT(info.This()->IsObject()); | 42 ASSERT(info.This()->IsObject()); |
| 43 // TODO(bashi): Consider using CreateDataProperty() instead of ForceSet(). |
| 43 v8::Local<v8::Object>::Cast(info.This())->ForceSet(info.GetIsolate()->GetCur
rentContext(), name, v8Value); | 44 v8::Local<v8::Object>::Cast(info.This())->ForceSet(info.GetIsolate()->GetCur
rentContext(), name, v8Value); |
| 44 } | 45 } |
| 45 | 46 |
| 46 static void readonlyLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) | 47 static void readonlyLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 47 { | 48 { |
| 48 v8::Local<v8::Object> holder = info.Holder(); | 49 v8::Local<v8::Object> holder = info.Holder(); |
| 49 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 50 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
| 50 ExceptionState exceptionState(ExceptionState::GetterContext, "readonlyLongAt
tribute", "TestInterfaceCheckSecurity", holder, info.GetIsolate()); | 51 ExceptionState exceptionState(ExceptionState::GetterContext, "readonlyLongAt
tribute", "TestInterfaceCheckSecurity", holder, info.GetIsolate()); |
| 51 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), exceptionState)) { | 52 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), exceptionState)) { |
| 52 v8SetReturnValueNull(info); | 53 v8SetReturnValueNull(info); |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 { | 622 { |
| 622 scriptWrappable->toImpl<TestInterfaceCheckSecurity>()->ref(); | 623 scriptWrappable->toImpl<TestInterfaceCheckSecurity>()->ref(); |
| 623 } | 624 } |
| 624 | 625 |
| 625 void V8TestInterfaceCheckSecurity::derefObject(ScriptWrappable* scriptWrappable) | 626 void V8TestInterfaceCheckSecurity::derefObject(ScriptWrappable* scriptWrappable) |
| 626 { | 627 { |
| 627 scriptWrappable->toImpl<TestInterfaceCheckSecurity>()->deref(); | 628 scriptWrappable->toImpl<TestInterfaceCheckSecurity>()->deref(); |
| 628 } | 629 } |
| 629 | 630 |
| 630 } // namespace blink | 631 } // namespace blink |
| OLD | NEW |