@@ -1729,12 +1729,12 @@ class V8_EXPORT StackFrame {
1729
1729
enum StateTag {
1730
1730
JS,
1731
1731
GC,
1732
- PARSER,
1733
- BYTECODE_COMPILER,
1734
1732
COMPILER,
1735
1733
OTHER,
1736
1734
EXTERNAL,
1737
- IDLE
1735
+ IDLE,
1736
+ PARSER,
1737
+ BYTECODE_COMPILER
1738
1738
};
1739
1739
1740
1740
// A RegisterState represents the current state of registers used
@@ -6348,6 +6348,8 @@ typedef void (*FailedAccessCheckCallback)(Local<Object> target,
6348
6348
* Callback to check if code generation from strings is allowed. See
6349
6349
* Context::AllowCodeGenerationFromStrings.
6350
6350
*/
6351
+ typedef bool (*DeprecatedAllowCodeGenerationFromStringsCallback)(
6352
+ Local<Context> context);
6351
6353
typedef bool (*AllowCodeGenerationFromStringsCallback)(Local<Context> context,
6352
6354
Local<String> source);
6353
6355
@@ -7636,6 +7638,9 @@ class V8_EXPORT Isolate {
7636
7638
*/
7637
7639
void SetAllowCodeGenerationFromStringsCallback(
7638
7640
AllowCodeGenerationFromStringsCallback callback);
7641
+ V8_DEPRECATED("Use callback with source parameter.",
7642
+ void SetAllowCodeGenerationFromStringsCallback(
7643
+ DeprecatedAllowCodeGenerationFromStringsCallback callback));
7639
7644
7640
7645
/**
7641
7646
* Embedder over{ride|load} injection points for wasm APIs. The expectation
@@ -7796,6 +7801,15 @@ class V8_EXPORT V8 {
7796
7801
"Use isolate version",
7797
7802
void SetFatalErrorHandler(FatalErrorCallback that));
7798
7803
7804
+ /**
7805
+ * Set the callback to invoke to check if code generation from
7806
+ * strings should be allowed.
7807
+ */
7808
+ V8_INLINE static V8_DEPRECATED(
7809
+ "Use isolate version",
7810
+ void SetAllowCodeGenerationFromStringsCallback(
7811
+ DeprecatedAllowCodeGenerationFromStringsCallback that));
7812
+
7799
7813
/**
7800
7814
* Check if V8 is dead and therefore unusable. This is the case after
7801
7815
* fatal errors such as out-of-memory situations.
@@ -8205,12 +8219,8 @@ class V8_EXPORT SnapshotCreator {
8205
8219
* Set the default context to be included in the snapshot blob.
8206
8220
* The snapshot will not contain the global proxy, and we expect one or a
8207
8221
* global object template to create one, to be provided upon deserialization.
8208
- *
8209
- * \param callback optional callback to serialize internal fields.
8210
8222
*/
8211
- void SetDefaultContext(Local<Context> context,
8212
- SerializeInternalFieldsCallback callback =
8213
- SerializeInternalFieldsCallback());
8223
+ void SetDefaultContext(Local<Context> context);
8214
8224
8215
8225
/**
8216
8226
* Add additional context to be included in the snapshot blob.
@@ -8562,9 +8572,7 @@ class V8_EXPORT Context {
8562
8572
static Local<Context> New(
8563
8573
Isolate* isolate, ExtensionConfiguration* extensions = NULL,
8564
8574
MaybeLocal<ObjectTemplate> global_template = MaybeLocal<ObjectTemplate>(),
8565
- MaybeLocal<Value> global_object = MaybeLocal<Value>(),
8566
- DeserializeInternalFieldsCallback internal_fields_deserializer =
8567
- DeserializeInternalFieldsCallback());
8575
+ MaybeLocal<Value> global_object = MaybeLocal<Value>());
8568
8576
8569
8577
/**
8570
8578
* Create a new context from a (non-default) context snapshot. There
@@ -9021,8 +9029,8 @@ class Internals {
9021
9029
static const int kNodeIsIndependentShift = 3;
9022
9030
static const int kNodeIsActiveShift = 4;
9023
9031
9024
- static const int kJSApiObjectType = 0xbd ;
9025
- static const int kJSObjectType = 0xbe ;
9032
+ static const int kJSApiObjectType = 0xbb ;
9033
+ static const int kJSObjectType = 0xbc ;
9026
9034
static const int kFirstNonstringType = 0x80;
9027
9035
static const int kOddballType = 0x82;
9028
9036
static const int kForeignType = 0x86;
@@ -10275,6 +10283,14 @@ void* Context::GetAlignedPointerFromEmbedderData(int index) {
10275
10283
#endif
10276
10284
}
10277
10285
10286
+ void V8::SetAllowCodeGenerationFromStringsCallback(
10287
+ DeprecatedAllowCodeGenerationFromStringsCallback callback) {
10288
+ Isolate* isolate = Isolate::GetCurrent();
10289
+ isolate->SetAllowCodeGenerationFromStringsCallback(
10290
+ reinterpret_cast<AllowCodeGenerationFromStringsCallback>(callback));
10291
+ }
10292
+
10293
+
10278
10294
bool V8::IsDead() {
10279
10295
Isolate* isolate = Isolate::GetCurrent();
10280
10296
return isolate->IsDead();
0 commit comments