@@ -1567,7 +1567,9 @@ class V8_EXPORT ScriptCompiler {
15671567 static V8_WARN_UNUSED_RESULT MaybeLocal<Function> CompileFunctionInContext (
15681568 Local<Context> context, Source* source, size_t arguments_count,
15691569 Local<String> arguments[], size_t context_extension_count,
1570- Local<Object> context_extensions[]);
1570+ Local<Object> context_extensions[],
1571+ CompileOptions options = kNoCompileOptions ,
1572+ NoCacheReason no_cache_reason = kNoCacheNoReason );
15711573
15721574 /* *
15731575 * Creates and returns code cache for the specified unbound_script.
@@ -1641,7 +1643,7 @@ class V8_EXPORT Message {
16411643 * Returns the index within the line of the first character where
16421644 * the error occurred.
16431645 */
1644- V8_DEPRECATED ( " Use maybe version " , int GetStartColumn () const ) ;
1646+ int GetStartColumn () const ;
16451647 V8_WARN_UNUSED_RESULT Maybe<int > GetStartColumn (Local<Context> context) const ;
16461648
16471649 /* *
@@ -3075,6 +3077,8 @@ enum PropertyFilter {
30753077 SKIP_SYMBOLS = 16
30763078};
30773079
3080+ enum class SideEffectType { kHasSideEffect , kHasNoSideEffect };
3081+
30783082/* *
30793083 * Keys/Properties filter enums:
30803084 *
@@ -3207,13 +3211,12 @@ class V8_EXPORT Object : public Value {
32073211 V8_WARN_UNUSED_RESULT Maybe<bool > Delete (Local<Context> context,
32083212 uint32_t index);
32093213
3210- V8_WARN_UNUSED_RESULT Maybe<bool > SetAccessor (Local<Context> context,
3211- Local<Name> name,
3212- AccessorNameGetterCallback getter,
3213- AccessorNameSetterCallback setter = 0 ,
3214- MaybeLocal<Value> data = MaybeLocal<Value>(),
3215- AccessControl settings = DEFAULT,
3216- PropertyAttribute attribute = None);
3214+ V8_WARN_UNUSED_RESULT Maybe<bool > SetAccessor (
3215+ Local<Context> context, Local<Name> name,
3216+ AccessorNameGetterCallback getter, AccessorNameSetterCallback setter = 0 ,
3217+ MaybeLocal<Value> data = MaybeLocal<Value>(),
3218+ AccessControl settings = DEFAULT, PropertyAttribute attribute = None,
3219+ SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect);
32173220
32183221 void SetAccessorProperty (Local<Name> name, Local<Function> getter,
32193222 Local<Function> setter = Local<Function>(),
@@ -3228,7 +3231,8 @@ class V8_EXPORT Object : public Value {
32283231 Local<Context> context, Local<Name> name,
32293232 AccessorNameGetterCallback getter,
32303233 AccessorNameSetterCallback setter = nullptr ,
3231- Local<Value> data = Local<Value>(), PropertyAttribute attributes = None);
3234+ Local<Value> data = Local<Value>(), PropertyAttribute attributes = None,
3235+ SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect);
32323236
32333237 /* *
32343238 * Attempts to create a property with the given name which behaves like a data
@@ -3241,7 +3245,8 @@ class V8_EXPORT Object : public Value {
32413245 V8_WARN_UNUSED_RESULT Maybe<bool > SetLazyDataProperty (
32423246 Local<Context> context, Local<Name> name,
32433247 AccessorNameGetterCallback getter, Local<Value> data = Local<Value>(),
3244- PropertyAttribute attributes = None);
3248+ PropertyAttribute attributes = None,
3249+ SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect);
32453250
32463251 /* *
32473252 * Functionality for private properties.
@@ -3496,7 +3501,7 @@ class V8_EXPORT Object : public Value {
34963501 /* *
34973502 * Return the isolate to which the Object belongs to.
34983503 */
3499- V8_DEPRECATE_SOON ( " Keep track of isolate correctly " , Isolate* GetIsolate () );
3504+ Isolate* GetIsolate ();
35003505
35013506 static Local<Object> New (Isolate* isolate);
35023507
@@ -3833,7 +3838,8 @@ class V8_EXPORT Function : public Object {
38333838 static MaybeLocal<Function> New (
38343839 Local<Context> context, FunctionCallback callback,
38353840 Local<Value> data = Local<Value>(), int length = 0,
3836- ConstructorBehavior behavior = ConstructorBehavior::kAllow);
3841+ ConstructorBehavior behavior = ConstructorBehavior::kAllow,
3842+ SideEffectType side_effect_type = SideEffectType::kHasSideEffect);
38373843 static V8_DEPRECATE_SOON (
38383844 " Use maybe version" ,
38393845 Local<Function> New (Isolate* isolate, FunctionCallback callback,
@@ -4271,13 +4277,6 @@ class V8_EXPORT ArrayBuffer : public Object {
42714277 */
42724278 virtual void * AllocateUninitialized (size_t length) = 0;
42734279
4274- /* *
4275- * Reserved |length| bytes, but do not commit the memory. Must call
4276- * |SetProtection| to make memory accessible.
4277- */
4278- // TODO(eholk): make this pure virtual once blink implements this.
4279- virtual void * Reserve (size_t length);
4280-
42814280 /* *
42824281 * Free the memory block of size |length|, pointed to by |data|.
42834282 * That memory is guaranteed to be previously allocated by |Allocate|.
@@ -4286,27 +4285,6 @@ class V8_EXPORT ArrayBuffer : public Object {
42864285
42874286 enum class AllocationMode { kNormal , kReservation };
42884287
4289- /* *
4290- * Free the memory block of size |length|, pointed to by |data|.
4291- * That memory is guaranteed to be previously allocated by |Allocate| or
4292- * |Reserve|, depending on |mode|.
4293- */
4294- // TODO(eholk): make this pure virtual once blink implements this.
4295- virtual void Free (void * data, size_t length, AllocationMode mode);
4296-
4297- enum class Protection { kNoAccess , kReadWrite };
4298-
4299- /* *
4300- * Change the protection on a region of memory.
4301- *
4302- * On platforms that make a distinction between reserving and committing
4303- * memory, changing the protection to kReadWrite must also ensure the memory
4304- * is committed.
4305- */
4306- // TODO(eholk): make this pure virtual once blink implements this.
4307- virtual void SetProtection (void * data, size_t length,
4308- Protection protection);
4309-
43104288 /* *
43114289 * malloc/free based convenience allocator.
43124290 *
@@ -5496,7 +5474,8 @@ class V8_EXPORT FunctionTemplate : public Template {
54965474 Isolate* isolate, FunctionCallback callback = 0 ,
54975475 Local<Value> data = Local<Value>(),
54985476 Local<Signature> signature = Local<Signature>(), int length = 0,
5499- ConstructorBehavior behavior = ConstructorBehavior::kAllow);
5477+ ConstructorBehavior behavior = ConstructorBehavior::kAllow,
5478+ SideEffectType side_effect_type = SideEffectType::kHasSideEffect);
55005479
55015480 /* * Get a template included in the snapshot by index. */
55025481 static MaybeLocal<FunctionTemplate> FromSnapshot (Isolate* isolate,
@@ -5508,7 +5487,8 @@ class V8_EXPORT FunctionTemplate : public Template {
55085487 static Local<FunctionTemplate> NewWithCache (
55095488 Isolate* isolate, FunctionCallback callback,
55105489 Local<Private> cache_property, Local<Value> data = Local<Value>(),
5511- Local<Signature> signature = Local<Signature>(), int length = 0);
5490+ Local<Signature> signature = Local<Signature>(), int length = 0,
5491+ SideEffectType side_effect_type = SideEffectType::kHasSideEffect);
55125492
55135493 /* * Returns the unique function instance in the current execution context.*/
55145494 V8_DEPRECATE_SOON (" Use maybe version" , Local<Function> GetFunction ());
@@ -5529,8 +5509,9 @@ class V8_EXPORT FunctionTemplate : public Template {
55295509 * callback is called whenever the function created from this
55305510 * FunctionTemplate is called.
55315511 */
5532- void SetCallHandler (FunctionCallback callback,
5533- Local<Value> data = Local<Value>());
5512+ void SetCallHandler (
5513+ FunctionCallback callback, Local<Value> data = Local<Value>(),
5514+ SideEffectType side_effect_type = SideEffectType::kHasSideEffect);
55345515
55355516 /* * Set the predefined length property for the FunctionTemplate. */
55365517 void SetLength (int length);
@@ -5828,7 +5809,7 @@ class V8_EXPORT ObjectTemplate : public Template {
58285809 * \param data A piece of data that will be passed to the callbacks
58295810 * whenever they are invoked.
58305811 */
5831- V8_DEPRECATE_SOON (
5812+ V8_DEPRECATED (
58325813 " Use SetHandler(const NamedPropertyHandlerConfiguration) "
58335814 " with the kOnlyInterceptStrings flag set." ,
58345815 void SetNamedPropertyHandler (
@@ -6586,8 +6567,11 @@ struct JitCodeEvent {
65866567 // statement, and is used to indicate possible break locations.
65876568 enum PositionType { POSITION, STATEMENT_POSITION };
65886569
6570+ enum CodeType { BYTE_CODE, JIT_CODE };
6571+
65896572 // Type of event.
65906573 EventType type;
6574+ CodeType code_type;
65916575 // Start of the instructions.
65926576 void * code_start;
65936577 // Size of the instructions.
@@ -8025,7 +8009,8 @@ class V8_EXPORT V8 {
80258009 * Enable the default signal handler rather than using one provided by the
80268010 * embedder.
80278011 */
8028- static bool RegisterDefaultSignalHandler ();
8012+ V8_DEPRECATE_SOON (" Use EnableWebAssemblyTrapHandler" ,
8013+ static bool RegisterDefaultSignalHandler ());
80298014
80308015 private:
80318016 V8 ();
0 commit comments