| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2013 Google Inc. All rights reserved. | 2  * Copyright (C) 2013 Google Inc. All rights reserved. | 
| 3  * | 3  * | 
| 4  * Redistribution and use in source and binary forms, with or without | 4  * Redistribution and use in source and binary forms, with or without | 
| 5  * modification, are permitted provided that the following conditions are | 5  * modification, are permitted provided that the following conditions are | 
| 6  * met: | 6  * met: | 
| 7  * | 7  * | 
| 8  *     * Redistributions of source code must retain the above copyright | 8  *     * Redistributions of source code must retain the above copyright | 
| 9  * notice, this list of conditions and the following disclaimer. | 9  * notice, this list of conditions and the following disclaimer. | 
| 10  *     * Redistributions in binary form must reproduce the above | 10  *     * Redistributions in binary form must reproduce the above | 
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 90 | 90 | 
| 91 static void doNotCheckSecurityLongAttributeAttributeGetterCallback(v8::Local<v8:
     :String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 91 static void doNotCheckSecurityLongAttributeAttributeGetterCallback(v8::Local<v8:
     :String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 
| 92 { | 92 { | 
| 93     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 93     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 
| 94     TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityLongAttributeAttribu
     teGetter(info); | 94     TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityLongAttributeAttribu
     teGetter(info); | 
| 95     TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 95     TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 
| 96 } | 96 } | 
| 97 | 97 | 
| 98 static void doNotCheckSecurityLongAttributeAttributeSetter(v8::Local<v8::Value> 
     jsValue, const v8::PropertyCallbackInfo<void>& info) | 98 static void doNotCheckSecurityLongAttributeAttributeSetter(v8::Local<v8::Value> 
     jsValue, const v8::PropertyCallbackInfo<void>& info) | 
| 99 { | 99 { | 
|  | 100     ExceptionState exceptionState(ExceptionState::SetterContext, "doNotCheckSecu
     rityLongAttribute", "TestInterfaceCheckSecurity", info.Holder(), info.GetIsolate
     ()); | 
| 100     TestInterfaceCheckSecurity* imp = V8TestInterfaceCheckSecurity::toNative(inf
     o.Holder()); | 101     TestInterfaceCheckSecurity* imp = V8TestInterfaceCheckSecurity::toNative(inf
     o.Holder()); | 
| 101     V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); | 102     V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
     xceptionState); | 
| 102     imp->setDoNotCheckSecurityLongAttribute(cppValue); | 103     imp->setDoNotCheckSecurityLongAttribute(cppValue); | 
| 103 } | 104 } | 
| 104 | 105 | 
| 105 static void doNotCheckSecurityLongAttributeAttributeSetterCallback(v8::Local<v8:
     :String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in
     fo) | 106 static void doNotCheckSecurityLongAttributeAttributeSetterCallback(v8::Local<v8:
     :String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in
     fo) | 
| 106 { | 107 { | 
| 107     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 108     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 
| 108     TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityLongAttributeAttribu
     teSetter(jsValue, info); | 109     TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityLongAttributeAttribu
     teSetter(jsValue, info); | 
| 109     TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 110     TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 
| 110 } | 111 } | 
| 111 | 112 | 
| (...skipping 18 matching lines...) Expand all  Loading... | 
| 130 | 131 | 
| 131 static void doNotCheckSecurityOnSetterLongAttributeAttributeGetterCallback(v8::L
     ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 132 static void doNotCheckSecurityOnSetterLongAttributeAttributeGetterCallback(v8::L
     ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 
| 132 { | 133 { | 
| 133     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 134     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 
| 134     TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttribut
     eAttributeGetter(info); | 135     TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttribut
     eAttributeGetter(info); | 
| 135     TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 136     TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 
| 136 } | 137 } | 
| 137 | 138 | 
| 138 static void doNotCheckSecurityOnSetterLongAttributeAttributeSetter(v8::Local<v8:
     :Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 139 static void doNotCheckSecurityOnSetterLongAttributeAttributeSetter(v8::Local<v8:
     :Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 
| 139 { | 140 { | 
|  | 141     ExceptionState exceptionState(ExceptionState::SetterContext, "doNotCheckSecu
     rityOnSetterLongAttribute", "TestInterfaceCheckSecurity", info.Holder(), info.Ge
     tIsolate()); | 
| 140     TestInterfaceCheckSecurity* imp = V8TestInterfaceCheckSecurity::toNative(inf
     o.Holder()); | 142     TestInterfaceCheckSecurity* imp = V8TestInterfaceCheckSecurity::toNative(inf
     o.Holder()); | 
| 141     V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); | 143     V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
     xceptionState); | 
| 142     imp->setDoNotCheckSecurityOnSetterLongAttribute(cppValue); | 144     imp->setDoNotCheckSecurityOnSetterLongAttribute(cppValue); | 
| 143 } | 145 } | 
| 144 | 146 | 
| 145 static void doNotCheckSecurityOnSetterLongAttributeAttributeSetterCallback(v8::L
     ocal<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v
     oid>& info) | 147 static void doNotCheckSecurityOnSetterLongAttributeAttributeSetterCallback(v8::L
     ocal<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v
     oid>& info) | 
| 146 { | 148 { | 
| 147     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 149     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 
| 148     TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttribut
     eAttributeSetter(jsValue, info); | 150     TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttribut
     eAttributeSetter(jsValue, info); | 
| 149     TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 151     TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 
| 150 } | 152 } | 
| 151 | 153 | 
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 554     fromInternalPointer(object)->deref(); | 556     fromInternalPointer(object)->deref(); | 
| 555 } | 557 } | 
| 556 | 558 | 
| 557 template<> | 559 template<> | 
| 558 v8::Handle<v8::Value> toV8NoInline(TestInterfaceCheckSecurity* impl, v8::Handle<
     v8::Object> creationContext, v8::Isolate* isolate) | 560 v8::Handle<v8::Value> toV8NoInline(TestInterfaceCheckSecurity* impl, v8::Handle<
     v8::Object> creationContext, v8::Isolate* isolate) | 
| 559 { | 561 { | 
| 560     return toV8(impl, creationContext, isolate); | 562     return toV8(impl, creationContext, isolate); | 
| 561 } | 563 } | 
| 562 | 564 | 
| 563 } // namespace WebCore | 565 } // namespace WebCore | 
| OLD | NEW | 
|---|