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

Unified Diff: third_party/WebKit/Source/modules/fetch/Headers.cpp

Issue 2519403002: binding: Lets Dictionary::getPropertyNames, etc. rethrow an exception. (Closed)
Patch Set: Addressed review comments. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/fetch/Headers.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/Headers.cpp b/third_party/WebKit/Source/modules/fetch/Headers.cpp
index 87d396e0c13e7e050c9676e104dddda8b4d8ec86..c420ef8c5cebc6ad83206e6ce22dda35e9a7c39a 100644
--- a/third_party/WebKit/Source/modules/fetch/Headers.cpp
+++ b/third_party/WebKit/Source/modules/fetch/Headers.cpp
@@ -284,9 +284,8 @@ void Headers::fillWith(const Vector<Vector<String>>& object,
void Headers::fillWith(const Dictionary& object,
ExceptionState& exceptionState) {
ASSERT(!m_headerList->size());
- Vector<String> keys;
- object.getPropertyNames(keys);
- if (!keys.size())
+ const Vector<String>& keys = object.getPropertyNames(exceptionState);
+ if (exceptionState.hadException() || !keys.size())
return;
// "3. Otherwise, if |object| is an open-ended dictionary, then for each

Powered by Google App Engine
This is Rietveld 408576698