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

Side by Side Diff: Source/bindings/v8/V8Binding.h

Issue 23799009: Always pass v8::Isolate to v8::Number::New() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/V8AbstractEventListener.h ('k') | Source/bindings/v8/V8NPObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Ericsson AB. All rights reserved. 3 * Copyright (C) 2012 Ericsson AB. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 template<> 257 template<>
258 struct V8ValueTraits<unsigned long> { 258 struct V8ValueTraits<unsigned long> {
259 static inline v8::Handle<v8::Value> arrayV8Value(const unsigned long& va lue, v8::Isolate* isolate) 259 static inline v8::Handle<v8::Value> arrayV8Value(const unsigned long& va lue, v8::Isolate* isolate)
260 { 260 {
261 return v8::Integer::NewFromUnsigned(value, isolate); 261 return v8::Integer::NewFromUnsigned(value, isolate);
262 } 262 }
263 }; 263 };
264 264
265 template<> 265 template<>
266 struct V8ValueTraits<float> { 266 struct V8ValueTraits<float> {
267 static inline v8::Handle<v8::Value> arrayV8Value(const float& value, v8: :Isolate*) 267 static inline v8::Handle<v8::Value> arrayV8Value(const float& value, v8: :Isolate* isolate)
268 { 268 {
269 return v8::Number::New(value); 269 return v8::Number::New(isolate, value);
270 } 270 }
271 }; 271 };
272 272
273 template<> 273 template<>
274 struct V8ValueTraits<double> { 274 struct V8ValueTraits<double> {
275 static inline v8::Handle<v8::Value> arrayV8Value(const double& value, v8 ::Isolate*) 275 static inline v8::Handle<v8::Value> arrayV8Value(const double& value, v8 ::Isolate* isolate)
276 { 276 {
277 return v8::Number::New(value); 277 return v8::Number::New(isolate, value);
278 } 278 }
279 }; 279 };
280 280
281 template<typename T, size_t inlineCapacity> 281 template<typename T, size_t inlineCapacity>
282 v8::Handle<v8::Value> v8Array(const Vector<T, inlineCapacity>& iterator, v8: :Isolate* isolate) 282 v8::Handle<v8::Value> v8Array(const Vector<T, inlineCapacity>& iterator, v8: :Isolate* isolate)
283 { 283 {
284 v8::Local<v8::Array> result = v8::Array::New(iterator.size()); 284 v8::Local<v8::Array> result = v8::Array::New(iterator.size());
285 int index = 0; 285 int index = 0;
286 typename Vector<T, inlineCapacity>::const_iterator end = iterator.end(); 286 typename Vector<T, inlineCapacity>::const_iterator end = iterator.end();
287 typedef V8ValueTraits<T> TraitsType; 287 typedef V8ValueTraits<T> TraitsType;
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 return v8::FunctionTemplate::New(function, environment)->GetFunction(); 633 return v8::FunctionTemplate::New(function, environment)->GetFunction();
634 } 634 }
635 635
636 v8::Local<v8::Value> getHiddenValueFromMainWorldWrapper(v8::Isolate*, Script Wrappable*, v8::Handle<v8::String> key); 636 v8::Local<v8::Value> getHiddenValueFromMainWorldWrapper(v8::Isolate*, Script Wrappable*, v8::Handle<v8::String> key);
637 637
638 v8::Isolate* getIsolateFromScriptExecutionContext(ScriptExecutionContext*); 638 v8::Isolate* getIsolateFromScriptExecutionContext(ScriptExecutionContext*);
639 639
640 } // namespace WebCore 640 } // namespace WebCore
641 641
642 #endif // V8Binding_h 642 #endif // V8Binding_h
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8AbstractEventListener.h ('k') | Source/bindings/v8/V8NPObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698