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

Side by Side Diff: Source/bindings/core/v8/ScriptValueTraits.h

Issue 625943002: Catch uncaught promise rejections from V8 and log to console. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed Created 6 years, 2 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ScriptValueTraits_h
6 #define ScriptValueTraits_h
7
8 #include "bindings/core/v8/ScriptValue.h"
9 #include "wtf/HashTraits.h"
10
11 namespace blink {
12
13 struct ScriptValueHash {
14 static unsigned hash(const ScriptValue& value) { return value.identityHash() ; }
15 static bool equal(const ScriptValue& a, const ScriptValue& b) { return a == b; }
16 static const bool safeToCompareToEmptyOrDeleted = true;
17 };
18
19 struct ScriptValueHashTraits : WTF::SimpleClassHashTraits<ScriptValue> {
20 static const bool hasIsEmptyValueFunction = true;
21 static bool isEmptyValue(const ScriptValue& value) { return value.isEmpty() && !value.isHashTableDeletedValue(); }
22 };
23
24 } // namespace blink
25
26 #endif // !defined(ScriptValueTraits_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698