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

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.cpp

Issue 1967453002: Always check that a Name is a String before converting it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 // 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 "V8TestSpecialOperationsNotEnumerable.h" 7 #include "V8TestSpecialOperationsNotEnumerable.h"
8 8
9 #include "bindings/core/v8/ExceptionState.h" 9 #include "bindings/core/v8/ExceptionState.h"
10 #include "bindings/core/v8/V8DOMConfiguration.h" 10 #include "bindings/core/v8/V8DOMConfiguration.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 v8SetReturnValueString(info, result, info.GetIsolate()); 42 v8SetReturnValueString(info, result, info.GetIsolate());
43 } 43 }
44 44
45 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall backInfo<v8::Value>& info) 45 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall backInfo<v8::Value>& info)
46 { 46 {
47 TestSpecialOperationsNotEnumerableV8Internal::indexedPropertyGetter(index, i nfo); 47 TestSpecialOperationsNotEnumerableV8Internal::indexedPropertyGetter(index, i nfo);
48 } 48 }
49 49
50 static void namedPropertyGetter(v8::Local<v8::Name> name, const v8::PropertyCall backInfo<v8::Value>& info) 50 static void namedPropertyGetter(v8::Local<v8::Name> name, const v8::PropertyCall backInfo<v8::Value>& info)
51 { 51 {
52 if (!name->IsString())
53 return;
52 auto nameString = name.As<v8::String>(); 54 auto nameString = name.As<v8::String>();
53 TestSpecialOperationsNotEnumerable* impl = V8TestSpecialOperationsNotEnumera ble::toImpl(info.Holder()); 55 TestSpecialOperationsNotEnumerable* impl = V8TestSpecialOperationsNotEnumera ble::toImpl(info.Holder());
54 AtomicString propertyName = toCoreAtomicString(nameString); 56 AtomicString propertyName = toCoreAtomicString(nameString);
55 String result = impl->anonymousNamedGetter(propertyName); 57 String result = impl->anonymousNamedGetter(propertyName);
56 if (result.isNull()) 58 if (result.isNull())
57 return; 59 return;
58 v8SetReturnValueString(info, result, info.GetIsolate()); 60 v8SetReturnValueString(info, result, info.GetIsolate());
59 } 61 }
60 62
61 static void namedPropertyGetterCallback(v8::Local<v8::Name> name, const v8::Prop ertyCallbackInfo<v8::Value>& info) 63 static void namedPropertyGetterCallback(v8::Local<v8::Name> name, const v8::Prop ertyCallbackInfo<v8::Value>& info)
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 { 102 {
101 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 103 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
102 } 104 }
103 105
104 TestSpecialOperationsNotEnumerable* V8TestSpecialOperationsNotEnumerable::toImpl WithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) 106 TestSpecialOperationsNotEnumerable* V8TestSpecialOperationsNotEnumerable::toImpl WithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value)
105 { 107 {
106 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : 0; 108 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : 0;
107 } 109 }
108 110
109 } // namespace blink 111 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698