Reviewers: Yang,
Description:
Version 4.3.47.1 (cherry-pick)
Merged c622cb637a2831f9c2bf0ec7b80bb65440e9afc4
Introduce explicit constant for per Context debug data set by embedder
BUG=chromium:466631
LOG=N
R=yang...@chromium.org
Please review this at https://codereview.chromium.org/1022013003/
Base URL: https://chromium.googlesource.com/v8/v8.git@4.3.47
Affected files (+9, -2 lines):
M include/v8.h
M include/v8-version.h
M src/compiler.cc
Index: include/v8-version.h
diff --git a/include/v8-version.h b/include/v8-version.h
index
cf4c664e7afe35c7d12a407eed477bf3030d8252..2a473109f4a32fc6e0d8db5bbb77eb92c957cb08
100644
--- a/include/v8-version.h
+++ b/include/v8-version.h
@@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 4
#define V8_MINOR_VERSION 3
#define V8_BUILD_NUMBER 47
-#define V8_PATCH_LEVEL 0
+#define V8_PATCH_LEVEL 1
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index
755a87fdba14f78c70e9ec8bd05a6852a65a49ce..a7c86fd0ba3e11adf361896245b602292644ff6e
100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -6255,6 +6255,13 @@ class V8_EXPORT Context {
v8::Isolate* GetIsolate();
/**
+ * The field at kDebugIdIndex is reserved for V8 debugger implementation.
+ * The value is propagated to the scripts compiled in given Context and
+ * can be used for filtering scripts.
+ */
+ enum EmbedderDataFields { kDebugIdIndex = 0 };
+
+ /**
* Gets the embedder data with the given index, which must have been set
by a
* previous call to SetEmbedderData with the same index. Note that index
0
* currently has a special meaning for Chrome's debugger.
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index
35c581f6b09b2bdb09fc3edb499e15ced5005e43..798fcab72aaacf67f45d19f6e10db9aa8420c9f5
100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1063,7 +1063,7 @@ static Handle<SharedFunctionInfo>
CompileToplevel(CompilationInfo* info) {
// TODO(svenpanne) Obscure place for this, perhaps move to
OnBeforeCompile?
FixedArray* array = isolate->native_context()->embedder_data();
- script->set_context_data(array->get(0));
+ script->set_context_data(array->get(v8::Context::kDebugIdIndex));
isolate->debug()->OnBeforeCompile(script);
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.