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

Unified Diff: include/v8.h

Issue 2563673002: [wasm] Generate correct locations for error messages (Closed)
Patch Set: Rebase Created 4 years 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 | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 6d7f5cab13098a1974dd3abf5c507f7f504888bc..e5ff0c0332b5035e9d065103054c0d7df9eb9b6e 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -962,19 +962,20 @@ class V8_EXPORT Data {
class ScriptOriginOptions {
public:
V8_INLINE ScriptOriginOptions(bool is_shared_cross_origin = false,
- bool is_opaque = false)
+ bool is_opaque = false, bool is_wasm = false)
: flags_((is_shared_cross_origin ? kIsSharedCrossOrigin : 0) |
- (is_opaque ? kIsOpaque : 0)) {}
+ (is_wasm ? kIsWasm : 0) | (is_opaque ? kIsOpaque : 0)) {}
V8_INLINE ScriptOriginOptions(int flags)
- : flags_(flags & (kIsSharedCrossOrigin | kIsOpaque)) {}
+ : flags_(flags & (kIsSharedCrossOrigin | kIsOpaque | kIsWasm)) {}
bool IsSharedCrossOrigin() const {
return (flags_ & kIsSharedCrossOrigin) != 0;
}
bool IsOpaque() const { return (flags_ & kIsOpaque) != 0; }
+ bool IsWasm() const { return (flags_ & kIsWasm) != 0; }
int Flags() const { return flags_; }
private:
- enum { kIsSharedCrossOrigin = 1, kIsOpaque = 1 << 1 };
+ enum { kIsSharedCrossOrigin = 1, kIsOpaque = 1 << 1, kIsWasm = 1 << 2 };
const int flags_;
};
@@ -990,7 +991,8 @@ class ScriptOrigin {
Local<Boolean> resource_is_shared_cross_origin = Local<Boolean>(),
Local<Integer> script_id = Local<Integer>(),
Local<Value> source_map_url = Local<Value>(),
- Local<Boolean> resource_is_opaque = Local<Boolean>());
+ Local<Boolean> resource_is_opaque = Local<Boolean>(),
+ Local<Boolean> is_wasm = Local<Boolean>());
V8_INLINE Local<Value> ResourceName() const;
V8_INLINE Local<Integer> ResourceLineOffset() const;
@@ -8839,13 +8841,15 @@ ScriptOrigin::ScriptOrigin(Local<Value> resource_name,
Local<Boolean> resource_is_shared_cross_origin,
Local<Integer> script_id,
Local<Value> source_map_url,
- Local<Boolean> resource_is_opaque)
+ Local<Boolean> resource_is_opaque,
+ Local<Boolean> is_wasm)
: resource_name_(resource_name),
resource_line_offset_(resource_line_offset),
resource_column_offset_(resource_column_offset),
options_(!resource_is_shared_cross_origin.IsEmpty() &&
resource_is_shared_cross_origin->IsTrue(),
- !resource_is_opaque.IsEmpty() && resource_is_opaque->IsTrue()),
+ !resource_is_opaque.IsEmpty() && resource_is_opaque->IsTrue(),
+ !is_wasm.IsEmpty() && is_wasm->IsTrue()),
script_id_(script_id),
source_map_url_(source_map_url) {}
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698