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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/Dictionary.h

Issue 2772013002: Fetch API: Fix behavior when Request constructor is passed an undefined referrer (Closed)
Patch Set: update expectation + rebase Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/core/v8/Dictionary.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/Dictionary.h b/third_party/WebKit/Source/bindings/core/v8/Dictionary.h
index 4523ca7d6c04e92a9b3348916fc13e248d04a57d..e9daffaed0c0bb0ea0a0d7b8ec69b2979e3111ac 100644
--- a/third_party/WebKit/Source/bindings/core/v8/Dictionary.h
+++ b/third_party/WebKit/Source/bindings/core/v8/Dictionary.h
@@ -133,11 +133,12 @@ struct DictionaryHelper {
T& value,
ExceptionState&);
template <typename T>
- static bool getWithUndefinedOrNullCheck(const Dictionary& dictionary,
- const StringView& key,
- T& value) {
+ static bool getWithUndefinedCheck(const Dictionary& dictionary,
+ const StringView& key,
+ T& value) {
v8::Local<v8::Value> v8Value;
- if (!dictionary.get(key, v8Value) || isUndefinedOrNull(v8Value))
+ if (!dictionary.get(key, v8Value) || v8Value.IsEmpty() ||
+ v8Value->IsUndefined())
return false;
return DictionaryHelper::get(dictionary, key, value);
}

Powered by Google App Engine
This is Rietveld 408576698