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

Side by Side Diff: Source/bindings/tests/results/core/V8TestInterface2.cpp

Issue 567503002: Add toDouble() helper, and use toFloat()/toDouble() for conversions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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 "config.h" 7 #include "config.h"
8 #include "V8TestInterface2.h" 8 #include "V8TestInterface2.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 324 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
325 } 325 }
326 326
327 static void namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) 327 static void namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
328 { 328 {
329 if (info.Holder()->HasRealNamedProperty(name)) 329 if (info.Holder()->HasRealNamedProperty(name))
330 return; 330 return;
331 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) 331 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
332 return; 332 return;
333 333
334 v8::String::Utf8Value namedProperty(name);
335 ExceptionState exceptionState(ExceptionState::SetterContext, *namedProperty, "TestInterface2", info.Holder(), info.GetIsolate());
334 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); 336 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder());
335 TOSTRING_VOID(V8StringResource<>, propertyName, name); 337 TOSTRING_VOID(V8StringResource<>, propertyName, name);
336 TOSTRING_VOID(V8StringResource<>, propertyValue, v8Value); 338 TOSTRING_VOID(V8StringResource<>, propertyValue, v8Value);
337 v8::String::Utf8Value namedProperty(name);
338 ExceptionState exceptionState(ExceptionState::SetterContext, *namedProperty, "TestInterface2", info.Holder(), info.GetIsolate());
339 bool result = impl->setNamedItem(propertyName, propertyValue, exceptionState ); 339 bool result = impl->setNamedItem(propertyName, propertyValue, exceptionState );
340 if (exceptionState.throwIfNeeded()) 340 if (exceptionState.throwIfNeeded())
341 return; 341 return;
342 if (!result) 342 if (!result)
343 return; 343 return;
344 v8SetReturnValue(info, v8Value); 344 v8SetReturnValue(info, v8Value);
345 } 345 }
346 346
347 static void namedPropertySetterCallback(v8::Local<v8::String> name, v8::Local<v8 ::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) 347 static void namedPropertySetterCallback(v8::Local<v8::String> name, v8::Local<v8 ::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
348 { 348 {
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 return 0; 517 return 0;
518 } 518 }
519 519
520 template<> 520 template<>
521 v8::Handle<v8::Value> toV8NoInline(TestInterface2* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) 521 v8::Handle<v8::Value> toV8NoInline(TestInterface2* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
522 { 522 {
523 return toV8(impl, creationContext, isolate); 523 return toV8(impl, creationContext, isolate);
524 } 524 }
525 525
526 } // namespace blink 526 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698