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

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

Issue 2717183002: Slim V8DOMConfiguration::MethodConfiguration by refactoring per-world bindings. (Closed)
Patch Set: haraken 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.h b/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.h
index 2c2db634c1da82a8ed87727c207ee3d1ddd6aa43..fb0ebae82b1dee5840ef737a69bcc7872f7c2d1f 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.h
+++ b/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.h
@@ -65,6 +65,13 @@ class CORE_EXPORT V8DOMConfiguration final {
DoNotCheckAccess,
};
+ // Bit field to select which worlds the member will be defined in.
+ enum WorldConfiguration : unsigned {
+ MainWorld = 1 << 0,
+ NonMainWorlds = 1 << 1,
+ AllWorlds = MainWorld | NonMainWorlds,
+ };
+
typedef v8::Local<v8::Private> (*CachedAccessorCallback)(v8::Isolate*);
// AttributeConfiguration translates into calls to SetNativeDataProperty() on
@@ -233,14 +240,9 @@ class CORE_EXPORT V8DOMConfiguration final {
v8::Local<v8::Name> methodName(v8::Isolate* isolate) const {
return v8AtomicString(isolate, name);
}
- v8::FunctionCallback callbackForWorld(const DOMWrapperWorld& world) const {
- return world.isMainWorld() && callbackForMainWorld ? callbackForMainWorld
- : callback;
- }
const char* const name;
v8::FunctionCallback callback;
- v8::FunctionCallback callbackForMainWorld;
int length;
// v8::PropertyAttribute
unsigned attribute : 8;
@@ -250,6 +252,8 @@ class CORE_EXPORT V8DOMConfiguration final {
unsigned holderCheckConfiguration : 1;
// AccessCheckConfiguration
unsigned accessCheckConfiguration : 1;
+ // WorldConfiguration
+ unsigned worldConfiguration : 2;
};
struct SymbolKeyedMethodConfiguration {
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698