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

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: Have Nullable<T>::trace() use TraceIfNeeded<>. 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 bool Dictionary::getWithUndefinedOrNullCheck(const String& key, RefPtrWillBeMemb er<Element>& value) const 152 bool Dictionary::getWithUndefinedOrNullCheck(const String& key, RefPtrWillBeMemb er<Element>& value) const
153 { 153 {
154 v8::Local<v8::Value> v8Value; 154 v8::Local<v8::Value> v8Value;
155 if (!getKey(key, v8Value) || WebCore::isUndefinedOrNull(v8Value)) 155 if (!getKey(key, v8Value) || WebCore::isUndefinedOrNull(v8Value))
156 return false; 156 return false;
157 157
158 value = V8Element::toNativeWithTypeCheck(m_isolate, v8Value); 158 value = V8Element::toNativeWithTypeCheck(m_isolate, v8Value);
159 return true; 159 return true;
160 } 160 }
161 161
162 bool Dictionary::getWithUndefinedOrNullCheck(const String& key, RefPtr<Path2D>& value) const 162 bool Dictionary::getWithUndefinedOrNullCheck(const String& key, RefPtrWillBeMemb er<Path2D>& value) const
163 { 163 {
164 v8::Local<v8::Value> v8Value; 164 v8::Local<v8::Value> v8Value;
165 if (!getKey(key, v8Value) || WebCore::isUndefinedOrNull(v8Value)) 165 if (!getKey(key, v8Value) || WebCore::isUndefinedOrNull(v8Value))
166 return false; 166 return false;
167 167
168 value = V8Path2D::toNativeWithTypeCheck(m_isolate, v8Value); 168 value = V8Path2D::toNativeWithTypeCheck(m_isolate, v8Value);
169 return true; 169 return true;
170 } 170 }
171 171
172 bool Dictionary::get(const String& key, Dictionary& value) const 172 bool Dictionary::get(const String& key, Dictionary& value) const
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 295
296 return *this; 296 return *this;
297 } 297 }
298 298
299 void Dictionary::ConversionContext::throwTypeError(const String& detail) 299 void Dictionary::ConversionContext::throwTypeError(const String& detail)
300 { 300 {
301 exceptionState().throwTypeError(detail); 301 exceptionState().throwTypeError(detail);
302 } 302 }
303 303
304 } // namespace WebCore 304 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698