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

Unified Diff: src/objects.h

Issue 1140673002: [V8] Added Script::is_opaque flag for embedders (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 7 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 | « src/debug.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index d6f3f41dba3cf04d9251f65b0329daf25406f8dc..d6cbd4c44190eb4b3fc273b9728849816e2f6f90 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -6738,17 +6738,11 @@ class Script: public Struct {
inline CompilationState compilation_state();
inline void set_compilation_state(CompilationState state);
- // [is_embedder_debug_script]: An opaque boolean set by the embedder via
- // ScriptOrigin, and used by the embedder to make decisions about the
- // script's origin. V8 just passes this through. Encoded in
- // the 'flags' field.
- DECL_BOOLEAN_ACCESSORS(is_embedder_debug_script)
-
- // [is_shared_cross_origin]: An opaque boolean set by the embedder via
- // ScriptOrigin, and used by the embedder to make decisions about the
- // script's level of privilege. V8 just passes this through. Encoded in
- // the 'flags' field.
- DECL_BOOLEAN_ACCESSORS(is_shared_cross_origin)
+ // [origin_options]: optional attributes set by the embedder via ScriptOrigin,
+ // and used by the embedder to make decisions about the script. V8 just passes
+ // this through. Encoded in the 'flags' field.
+ inline v8::ScriptOriginOptions origin_options();
+ inline void set_origin_options(ScriptOriginOptions origin_options);
DECLARE_CAST(Script)
@@ -6800,8 +6794,10 @@ class Script: public Struct {
// Bit positions in the flags field.
static const int kCompilationTypeBit = 0;
static const int kCompilationStateBit = 1;
- static const int kIsEmbedderDebugScriptBit = 2;
- static const int kIsSharedCrossOriginBit = 3;
+ static const int kOriginOptionsShift = 2;
+ static const int kOriginOptionsSize = 3;
+ static const int kOriginOptionsMask = ((1 << kOriginOptionsSize) - 1)
+ << kOriginOptionsShift;
DISALLOW_IMPLICIT_CONSTRUCTORS(Script);
};
« no previous file with comments | « src/debug.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698