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

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceCheckSecurity.cpp

Issue 121113004: Improve handling of failed integer type conversions. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 11 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 /* 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 static void doNotCheckSecurityLongAttributeAttributeGetterCallback(v8::Local<v8: :String>, const v8::PropertyCallbackInfo<v8::Value>& info) 92 static void doNotCheckSecurityLongAttributeAttributeGetterCallback(v8::Local<v8: :String>, const v8::PropertyCallbackInfo<v8::Value>& info)
93 { 93 {
94 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 94 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
95 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityLongAttributeAttribu teGetter(info); 95 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityLongAttributeAttribu teGetter(info);
96 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 96 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
97 } 97 }
98 98
99 static void doNotCheckSecurityLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 99 static void doNotCheckSecurityLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
100 { 100 {
101 ExceptionState exceptionState(ExceptionState::SetterContext, "doNotCheckSecu rityLongAttribute", "TestInterfaceCheckSecurity", info.Holder(), info.GetIsolate ());
101 TestInterfaceCheckSecurity* imp = V8TestInterfaceCheckSecurity::toNative(inf o.Holder()); 102 TestInterfaceCheckSecurity* imp = V8TestInterfaceCheckSecurity::toNative(inf o.Holder());
102 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 103 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
103 imp->setDoNotCheckSecurityLongAttribute(cppValue); 104 imp->setDoNotCheckSecurityLongAttribute(cppValue);
104 } 105 }
105 106
106 static void doNotCheckSecurityLongAttributeAttributeSetterCallback(v8::Local<v8: :String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in fo) 107 static void doNotCheckSecurityLongAttributeAttributeSetterCallback(v8::Local<v8: :String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in fo)
107 { 108 {
108 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 109 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
109 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityLongAttributeAttribu teSetter(jsValue, info); 110 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityLongAttributeAttribu teSetter(jsValue, info);
110 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 111 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
111 } 112 }
112 113
(...skipping 18 matching lines...) Expand all
131 132
132 static void doNotCheckSecurityOnSetterLongAttributeAttributeGetterCallback(v8::L ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 133 static void doNotCheckSecurityOnSetterLongAttributeAttributeGetterCallback(v8::L ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
133 { 134 {
134 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 135 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
135 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttribut eAttributeGetter(info); 136 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttribut eAttributeGetter(info);
136 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 137 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
137 } 138 }
138 139
139 static void doNotCheckSecurityOnSetterLongAttributeAttributeSetter(v8::Local<v8: :Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 140 static void doNotCheckSecurityOnSetterLongAttributeAttributeSetter(v8::Local<v8: :Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
140 { 141 {
142 ExceptionState exceptionState(ExceptionState::SetterContext, "doNotCheckSecu rityOnSetterLongAttribute", "TestInterfaceCheckSecurity", info.Holder(), info.Ge tIsolate());
141 TestInterfaceCheckSecurity* imp = V8TestInterfaceCheckSecurity::toNative(inf o.Holder()); 143 TestInterfaceCheckSecurity* imp = V8TestInterfaceCheckSecurity::toNative(inf o.Holder());
142 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 144 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
143 imp->setDoNotCheckSecurityOnSetterLongAttribute(cppValue); 145 imp->setDoNotCheckSecurityOnSetterLongAttribute(cppValue);
144 } 146 }
145 147
146 static void doNotCheckSecurityOnSetterLongAttributeAttributeSetterCallback(v8::L ocal<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v oid>& info) 148 static void doNotCheckSecurityOnSetterLongAttributeAttributeSetterCallback(v8::L ocal<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v oid>& info)
147 { 149 {
148 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 150 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
149 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttribut eAttributeSetter(jsValue, info); 151 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttribut eAttributeSetter(jsValue, info);
150 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 152 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
151 } 153 }
152 154
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface.cpp ('k') | Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698