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

Side by Side Diff: Source/bindings/core/v8/Dictionary.cpp

Issue 365653002: Oilpan: move 2D Canvas and WebGL objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make WebGLObjects keep a blink::WebGraphicsContext3D for finalization. Created 6 years, 5 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 bool Dictionary::getWithUndefinedOrNullCheck(const String& key, RefPtrWillBeMemb er<Element>& value) const 429 bool Dictionary::getWithUndefinedOrNullCheck(const String& key, RefPtrWillBeMemb er<Element>& value) const
430 { 430 {
431 v8::Local<v8::Value> v8Value; 431 v8::Local<v8::Value> v8Value;
432 if (!getKey(key, v8Value) || WebCore::isUndefinedOrNull(v8Value)) 432 if (!getKey(key, v8Value) || WebCore::isUndefinedOrNull(v8Value))
433 return false; 433 return false;
434 434
435 value = V8Element::toNativeWithTypeCheck(m_isolate, v8Value); 435 value = V8Element::toNativeWithTypeCheck(m_isolate, v8Value);
436 return true; 436 return true;
437 } 437 }
438 438
439 bool Dictionary::getWithUndefinedOrNullCheck(const String& key, RefPtr<Path2D>& value) const 439 bool Dictionary::getWithUndefinedOrNullCheck(const String& key, RefPtrWillBeMemb er<Path2D>& value) const
440 { 440 {
441 v8::Local<v8::Value> v8Value; 441 v8::Local<v8::Value> v8Value;
442 if (!getKey(key, v8Value) || WebCore::isUndefinedOrNull(v8Value)) 442 if (!getKey(key, v8Value) || WebCore::isUndefinedOrNull(v8Value))
443 return false; 443 return false;
444 444
445 value = V8Path2D::toNativeWithTypeCheck(m_isolate, v8Value); 445 value = V8Path2D::toNativeWithTypeCheck(m_isolate, v8Value);
446 return true; 446 return true;
447 } 447 }
448 448
449 bool Dictionary::get(const String& key, RefPtr<Uint8Array>& value) const 449 bool Dictionary::get(const String& key, RefPtr<Uint8Array>& value) const
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 799
800 return *this; 800 return *this;
801 } 801 }
802 802
803 void Dictionary::ConversionContext::throwTypeError(const String& detail) 803 void Dictionary::ConversionContext::throwTypeError(const String& detail)
804 { 804 {
805 exceptionState().throwTypeError(detail); 805 exceptionState().throwTypeError(detail);
806 } 806 }
807 807
808 } // namespace WebCore 808 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698