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

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

Issue 38063003: Improve TypeError messages from failed array conversions. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Improve TypeError messages from failed array conversions. Created 7 years, 1 month 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 } 281 }
282 282
283 bool Dictionary::get(const String& key, MessagePortArray& value) const 283 bool Dictionary::get(const String& key, MessagePortArray& value) const
284 { 284 {
285 v8::Local<v8::Value> v8Value; 285 v8::Local<v8::Value> v8Value;
286 if (!getKey(key, v8Value)) 286 if (!getKey(key, v8Value))
287 return false; 287 return false;
288 288
289 ASSERT(m_isolate); 289 ASSERT(m_isolate);
290 ASSERT(m_isolate == v8::Isolate::GetCurrent()); 290 ASSERT(m_isolate == v8::Isolate::GetCurrent());
291 return getMessagePortArray(v8Value, value, m_isolate); 291 return getMessagePortArray(v8Value, key, value, m_isolate);
292 } 292 }
293 293
294 bool Dictionary::get(const String& key, HashSet<AtomicString>& value) const 294 bool Dictionary::get(const String& key, HashSet<AtomicString>& value) const
295 { 295 {
296 v8::Local<v8::Value> v8Value; 296 v8::Local<v8::Value> v8Value;
297 if (!getKey(key, v8Value)) 297 if (!getKey(key, v8Value))
298 return false; 298 return false;
299 299
300 // FIXME: Support array-like objects 300 // FIXME: Support array-like objects
301 if (!v8Value->IsArray()) 301 if (!v8Value->IsArray())
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 if (!options->Has(key)) 593 if (!options->Has(key))
594 continue; 594 continue;
595 V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, stringKey, ke y, false); 595 V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, stringKey, ke y, false);
596 names.append(stringKey); 596 names.append(stringKey);
597 } 597 }
598 598
599 return true; 599 return true;
600 } 600 }
601 601
602 } // namespace WebCore 602 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestTypedefs.cpp ('k') | Source/bindings/v8/ExceptionMessages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698