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

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

Issue 16904002: Avoid leaking objects between isolated worlds via attribute event listeners (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 7 years, 6 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/V8Binding.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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 } 333 }
334 334
335 inline float toFloat(v8::Local<v8::Value> value) 335 inline float toFloat(v8::Local<v8::Value> value)
336 { 336 {
337 return static_cast<float>(value->NumberValue()); 337 return static_cast<float>(value->NumberValue());
338 } 338 }
339 339
340 WrapperWorldType worldType(v8::Isolate*); 340 WrapperWorldType worldType(v8::Isolate*);
341 WrapperWorldType worldTypeInMainThread(v8::Isolate*); 341 WrapperWorldType worldTypeInMainThread(v8::Isolate*);
342 342
343 DOMWrapperWorld* isolatedWorldForIsolate(v8::Isolate*);
344
343 template<class T> struct NativeValueTraits; 345 template<class T> struct NativeValueTraits;
344 346
345 template<> 347 template<>
346 struct NativeValueTraits<String> { 348 struct NativeValueTraits<String> {
347 static inline String nativeValue(const v8::Handle<v8::Value>& value) 349 static inline String nativeValue(const v8::Handle<v8::Value>& value)
348 { 350 {
349 return toWebCoreString(value); 351 return toWebCoreString(value);
350 } 352 }
351 }; 353 };
352 354
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 template <class T> 542 template <class T>
541 v8::Handle<T> unsafeHandleFromRawValue(const T* value) 543 v8::Handle<T> unsafeHandleFromRawValue(const T* value)
542 { 544 {
543 const v8::Handle<T>* handle = reinterpret_cast<const v8::Handle<T>*>(&va lue); 545 const v8::Handle<T>* handle = reinterpret_cast<const v8::Handle<T>*>(&va lue);
544 return *handle; 546 return *handle;
545 } 547 }
546 548
547 } // namespace WebCore 549 } // namespace WebCore
548 550
549 #endif // V8Binding_h 551 #endif // V8Binding_h
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8AbstractEventListener.h ('k') | Source/bindings/v8/V8Binding.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698