Commit Graph

1712 Commits

Author SHA1 Message Date
Dan Elphick
cbd8f4269f [api] Remove several deprecated methods
Removes deprecated platform::CreateDefaultPlatform,
Object::GetPropertNames/GetOwnPropertyNames/HasRealNamedProperty/
HasRealIndexedProperty/HasRealNamedCallbackProperty,
Function::New/Call and Isolate::SetWasmCompileStreamingCallback.

Change-Id: I00c73576bbfbdc6bbe72bad9ac9d7a338a5bf068
Reviewed-on: https://chromium-review.googlesource.com/c/1460952
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59510}
2019-02-11 16:55:11 +00:00
Toon Verwaest
b9af6ad89d [api] Mark SetHiddenPrototype as DEPRECATED
Change-Id: Iad53e1a3b6ef0148dc5aa9c5c04c25c446dcdfa2
Reviewed-on: https://chromium-review.googlesource.com/c/1460468
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59464}
2019-02-08 14:49:30 +00:00
Dan Elphick
c6d2169183 [api] Advance deprecation for Value::BooleanValue
Mark Context version of BooleanValue as V8_DEPRECATED.

Bug: v8:7279, v8:8562
Change-Id: I152f5080d92a940dadea9e8f2ed3f25338e6f099
Reviewed-on: https://chromium-review.googlesource.com/c/1458245
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59452}
2019-02-08 11:33:07 +00:00
Clemens Hammacher
c4411b0be8 [api] Deprecate legacy RegisterExtension method
The new API receives a unique_ptr to avoid leaking the Extension object.
All chromium uses were refactored in https://crrev.com/c/1447652.

R=adamk@chromium.org

Bug: v8:8725
Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Change-Id: I46a931a73e941fe7b78f5390fec74663677e13e4
Reviewed-on: https://chromium-review.googlesource.com/c/1454723
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59451}
2019-02-08 10:55:17 +00:00
Mythri
648ba1f7dd Defer inferring language mode for PropertyCallbackInfo
This cl: https://chromium-review.googlesource.com/c/v8/v8/+/1421077
changed the implementation of SetProperty to infer the language mode.
Language mode is only required when there is an error to decide if we
have to throw an error or not. However we used to compute language mode
eagerly for PropertyCallbackInfo. This causes regressions in some
benchmarks. This cl changes it by deferring it further by computing
it only when it is actually required.

BUG: v8:8580, chromium:925289
Change-Id: Iba70ec5f9bb3deec16414a1ec418b3963f2144f9
Reviewed-on: https://chromium-review.googlesource.com/c/1454608
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59450}
2019-02-08 10:24:27 +00:00
Michael Lippautz
edef7f1341 [api,global-handle] Introduce TracedGlobal::SetFinalizationCallback
Introduce a way to set a custom finalization callback that can be used
to signal and set up destruction of embedder memory.

Bug: chromium:923361
Change-Id: Ifc62ebd534aba3b02511c74b59161ec3edc0ee0d
Reviewed-on: https://chromium-review.googlesource.com/c/1452447
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59381}
2019-02-05 21:46:07 +00:00
Ross McIlroy
6f5e805284 [Cleanup] Delete deprecated FunctionTemplate::GetFunction API.
BUG=v8:7295,v8:8562

Change-Id: Ifa02ba233967ba38d4ff43576de77738001d076a
Reviewed-on: https://chromium-review.googlesource.com/c/1450115
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59330}
2019-02-04 10:58:48 +00:00
Ross McIlroy
2cbfbc2a1d [Cleanup] Delete deprecated ObjectTemplate::NewInstance() API
BUG=v8:7294,v8:8562

Change-Id: I1ed3b6d6a2fed2aee224e22ae8db5d76a52998a5
Reviewed-on: https://chromium-review.googlesource.com/c/1449731
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59301}
2019-02-01 16:47:35 +00:00
Michael Lippautz
96315d1622 [api] Mark old method for tracing as soon deprecated
Users should switch to TracedGlobal and the newly added methods of
v8::EmbedderHeapTracer.

Bug: chromium:923361, v8:8562
Change-Id: I3e5ed5785a0a49c0b65c7b1d1d103e568dd3e938
Reviewed-on: https://chromium-review.googlesource.com/c/1445752
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59297}
2019-02-01 14:51:34 +00:00
Ross McIlroy
cbeeb86baa [Cleanup] Delete deprecated ExternalOneByteStringResourceImpl and IsCompressible
BUG=v8:8395

Change-Id: I717f4c35fb9764a2ffb97662eef0148ad04284e6
Reviewed-on: https://chromium-review.googlesource.com/c/1449633
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59294}
2019-02-01 14:27:50 +00:00
Ross McIlroy
30c1199f77 [Cleanup] Delete deprecated RegisterDefaultTrapHandler API.
BUG=v8:8562

Change-Id: I66b729aeb306ecfbf92ee6e992c3abb6f854949c
Reviewed-on: https://chromium-review.googlesource.com/c/1449733
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59290}
2019-02-01 13:13:10 +00:00
Clemens Hammacher
7539549e28 [api] Accept Extensions via unique_ptr
This way we can remove them correctly and avoid leaks.

R=mstarzinger@chromium.org, ulan@chromium.org

Bug: v8:8725
Change-Id: I52cbbf34a94171aaeb581b55aecb25311465544d
Reviewed-on: https://chromium-review.googlesource.com/c/1446453
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59266}
2019-02-01 07:15:18 +00:00
Michael Lippautz
06193b0b79 [api] Move forward deprecations around Persistent handles
In future, weak handles will be considered as independent and MarkActive() will
not be supported anymore. Users should switch to TracedGlobal, when relying on
special cases for using handles with v8::EmbedderHeapTracer.

Bug: chromium:923361, v8:8562
Change-Id: Ic6e01a1ab59a25c5fb0aa2ebfb8ddb02e454d72d
Reviewed-on: https://chromium-review.googlesource.com/c/1443064
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59194}
2019-01-30 10:13:24 +00:00
Deepti Gandluri
4089299494 Add a contents based constructor to the SharedArrayBuffer API
The motivation of this change was originally to preserve is_growable
flag over PostMessage in d8. Adding a more general constructor that
uses SharedArrayBuffer::Contents.

Change-Id: Ib8f6c36d659e91f6cfb6487f56de34fa7e8841a9
Bug: v8:8564
Reviewed-on: https://chromium-review.googlesource.com/c/1383093
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59184}
2019-01-29 20:47:30 +00:00
Michael Lippautz
76c9368593 [api, global-handles] Add TracedGlobal
TracedGlobal integrates with the use case of EmbedderHeapTracer and replaces
regular weak Global or Persistent nodes for such cases. This allows to simplify
the case for regular weak handles in a sense that they follow regular weak
semantics (if the underlying object is otherwise unreachable the weak handle
will be reset).

TracedGlobal requires slightly different semantics in the sense that it can be
required to keep them alive on Scavenge garbage collections because there's a
transitive path that is only known when using the EmbedderHeapTracer.
TracedGlobal accomodates that use case.

TracedGlobal follows move semantics and can thus be used in regular std
containers without wrapping data structure.

The internal state uses 20% less memory and allows for only iterating those
nodes when necessary. The design trades the virtual call when iterating
interesting persistents in the GC prologue with calling out through the
EmbedderHeapTracer for each node which is also a virtual call. There is one less
iteration over the set of handles required though and the design is robust
against recursive GCs that mutate the embedder state during the prologue
callback.

Bug: chromium:923361
Change-Id: Idbacfbe4723cd12af9de21058a4792e51dc4df74
Reviewed-on: https://chromium-review.googlesource.com/c/1425523
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59183}
2019-01-29 20:15:39 +00:00
Clemens Hammacher
5b1c8b6b63 [api][wasm] Remove deprecated objects and methods
The API for serialized modules changed a bit in version 7.3. The old
API is deprecated, hence remove it in 7.4.

R=mstarzinger@chromium.org, ulan@chromium.org

Bug: chromium:912031

Change-Id: Ib1a55dc88db9e98aef03006caf8cdc1be4f85b9f
Reviewed-on: https://chromium-review.googlesource.com/c/1436020
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59122}
2019-01-28 13:14:38 +00:00
Clemens Hammacher
7613345248 [api] Remove deprecated PropertyDescriptor constructor
The implicit constructor is deprecated since version 7.3, hence can be
removed in 7.4.

R=ulan@chromium.org

Change-Id: I54a530240648c1721924195d7fccc157d483e6d8
Reviewed-on: https://chromium-review.googlesource.com/c/1436018
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59116}
2019-01-28 11:50:22 +00:00
Michael Lippautz
2452e59835 [api] Remove deprecated EmbedderHeapTracer::AbortTracing
V8 has no path in calling this API and thus there is no way for the
embedder to get notified about this event.

Bug: chromium:843903
Change-Id: I938675aed9191a292f21bae0fed0e3ea8acaf936
Reviewed-on: https://chromium-review.googlesource.com/c/1434377
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59087}
2019-01-25 09:08:41 +00:00
Ulan Degenbaev
ab10dae929 [heap-profiler] Remove the old RetainerInfo mechanism.
Bug: chromium:749490
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I4ae6883dd5ed5f313e21af20c29e560c73c33675
Reviewed-on: https://chromium-review.googlesource.com/c/948903
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59076}
2019-01-24 16:58:31 +00:00
Michael Lippautz
97184fbf94 Reland "[api, global-handles] Fix moving weak Global<T>"
v8::Global may be used as a weak reference. In the case this reference is a
simple phantom reference, we need to update the internal state to be able to
clear the right slot once the object referred to is dead.

This reverts commit 18f32ca89c.

Bug: chromium:924220
Change-Id: I3caec77448b0c5fcb461c8f8b5015de2978b3931
Reviewed-on: https://chromium-review.googlesource.com/c/1430015
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59055}
2019-01-24 10:32:39 +00:00
Maya Lekova
18f32ca89c Revert "[api, global-handles] Fix moving weak Global<T>"
This reverts commit 584f0b43b2.

Reason for revert: Breaks MSAN build - https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/24872

Original change's description:
> [api, global-handles] Fix moving weak Global<T>
> 
> v8::Global may be used as a weak reference. In the case this reference is a
> simple phantom reference, we need to update the internal state to be able to
> clear the right slot once the object refered to is dead.
> 
> Bug: chromium:924220
> Change-Id: I2ab7c3afcbe22988791faef406c284db03a43caf
> Reviewed-on: https://chromium-review.googlesource.com/c/1430101
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59040}

TBR=ulan@chromium.org,mlippautz@chromium.org

Change-Id: I19c3e929962203df4e1f24191d054180723b1c9d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:924220
Reviewed-on: https://chromium-review.googlesource.com/c/1430833
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59046}
2019-01-23 17:07:03 +00:00
Michael Lippautz
584f0b43b2 [api, global-handles] Fix moving weak Global<T>
v8::Global may be used as a weak reference. In the case this reference is a
simple phantom reference, we need to update the internal state to be able to
clear the right slot once the object refered to is dead.

Bug: chromium:924220
Change-Id: I2ab7c3afcbe22988791faef406c284db03a43caf
Reviewed-on: https://chromium-review.googlesource.com/c/1430101
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59040}
2019-01-23 16:01:55 +00:00
Michael Lippautz
0781f42b67 [global-handles] Deprecate unused methods
Bug: chromium:923361
Change-Id: I520b2778b8a2fe3fcd52570f3a91758bc949f374
Reviewed-on: https://chromium-review.googlesource.com/c/1425897
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58975}
2019-01-21 19:50:04 +00:00
Dan Elphick
b121cde901 [api] Add Check method to Maybe
This new method returns no value and just verifies that the Maybe is not
Empty. This is intended to be used for functions like Object::Set that
return a Maybe<bool> but only use "emptiness" to indicate its result and
where ToLocalChecked() appears to be discarding information.

Also comments Object::Set to indicate that Check() is the preferred way
of asserting that the Set should always succeed.

R=yangguo

Bug: v8:8562
Change-Id: Ic3b45e42fa9ba0b53f1a764660a56041e64f087b
Reviewed-on: https://chromium-review.googlesource.com/c/1414912
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58852}
2019-01-16 14:25:13 +00:00
Ulan Degenbaev
93283bf04a [heap, api] Add API for automatically restoring the heap limit.
Now the embedder can instruct V8 to restore the initial heap limit
once the heap size drops below the given percentage of the heap limit.

Bug: chromium:922038
Change-Id: Ib668406c5d59c02b45a8eae7de96527ebc3f2b4d
Reviewed-on: https://chromium-review.googlesource.com/c/1411606
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58837}
2019-01-15 18:08:07 +00:00
Dan Elphick
a16c1250e0 Advance SetWasmCompileStreamingCallback deprecation
Change Isolate::SetWasmCompileStreamingCallback from
V8_DEPRECATE_SOON to V8_DEPRECATED.

Bug: v8:8562
Change-Id: I57b2e72817fe5b580fe6dc123a2389247010cb43
Reviewed-on: https://chromium-review.googlesource.com/c/1411634
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58819}
2019-01-15 11:04:56 +00:00
Dan Elphick
195686d37c Advance GetProperyNames/GetOwnPropertyNames deprecation
Change Object::GetPropertyNames/GetOwnPropertyNames from
V8_DEPRECATE_SOON to V8_DEPRECATED.

Bug: v8:7286, v8:8562
Change-Id: I2c601e6bf729e8fb68be8bc9a7b1618da61934af
Reviewed-on: https://chromium-review.googlesource.com/c/1393285
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58624}
2019-01-08 11:59:19 +00:00
Jakob Kummerow
f49efaef06 [ubsan] Drop old NeverReadOnlySpaceObject class
Two uses in the API needed adaptation; all other uses have already
been subsumed by the new implementation (previously known as
NeverReadOnlySpaceObjectPtr, here renamed to NeverReadOnlySpaceObject).

Bug: v8:3770
Change-Id: Idf0e4a98a407b9afea22e8790da34cf017b892a5
Reviewed-on: https://chromium-review.googlesource.com/c/1397671
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58620}
2019-01-08 10:42:35 +00:00
Igor Sheludko
90698aee18 [ptr-compr] Support decompression in include/v8.h and include/v8-internal.h
Bug: v8:7703
Change-Id: I2cc5ceb7b70a9b53d5bcc90b32276c011f89ffbe
Reviewed-on: https://chromium-review.googlesource.com/c/1388530
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58476}
2018-12-27 11:07:24 +00:00
Bill Budge
fc479d516b [api] Change Wasm ModuleCompiled notification
- Removes ModuleCompiledCallback typedef and Set function.
- Adds WasmStreaming::Client abstraction and Set function.

Bug: chromium:719172
Change-Id: I8a207b628394a7660bda73cde560da1e461248a7
Reviewed-on: https://chromium-review.googlesource.com/c/1377450
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58454}
2018-12-21 23:32:29 +00:00
Jakob Kummerow
9302db480e [ubsan] Port HeapObject to the new design
Merging the temporary HeapObjectPtr back into HeapObject.

Bug: v8:3770
Change-Id: I5bcd23ca2f5ba862cf5b52955dca143e531c637b
Reviewed-on: https://chromium-review.googlesource.com/c/1386492
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58410}
2018-12-20 16:43:49 +00:00
Mike West
14ebea15a4 Add counter to track Date::getTimezoneOffset().
Bug: chromium:915620
Change-Id: I75579080098632639b125b2252b3ab9615c7ea95
Reviewed-on: https://chromium-review.googlesource.com/c/1379876
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58306}
2018-12-18 08:15:10 +00:00
Clemens Hammacher
b5c757d6b7 [wasm] Deprecate old serialization API
Uses of the old API were removed from chromium in
https://crrev.com/c/1373749.

R=adamk@chromium.org

Bug: chromium:912031
Change-Id: I3fed4d72c147ef8e00ec96f869af2134e7ee71c8
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/1373769
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58205}
2018-12-13 09:02:28 +00:00
Yutaka Hirano
228b362a52 Introduce v8::Promise::Then(context, on_fulfilled, on_rejected)
Currently v8::Promise::Then takes only one handler. It should take two handlers,
on_fulfilled and on_rejected like ECMAScript Promise.

Bug: chromium:912848
Change-Id: I08a20990a27b3f8621225fad42a8de1dad67796f
Reviewed-on: https://chromium-review.googlesource.com/c/1375509
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58204}
2018-12-13 08:41:55 +00:00
Igor Sheludko
4e5008a50d [ptr-compr] Let EmbedderDataSlot store raw data in a non-tagged part
and update visitors to not look at raw part. This will allow to have effecient
access to embedder data once kTaggedSize is switched to 32-bit value.

Bug: v8:8518
Change-Id: Ia1875a5ac5f3fb85df5c5555b970fd88d9e8d7a4
Reviewed-on: https://chromium-review.googlesource.com/c/1369957
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58185}
2018-12-12 11:59:50 +00:00
Clemens Hammacher
8badfe6e9f [wasm][api] Deprecate WasmCompiledModule
Chromium does not use this name any more since
https://crrev.com/c/1369854, so we can deprecate it for the 7.3 branch.

R=adamk@chromium.org

Bug: v8:8238, chromium:912031
Change-Id: I0625f58a893f48d89dec76851af292c9c32af035
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/1370035
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58183}
2018-12-12 10:28:06 +00:00
Ross McIlroy
0fd93d3ad5 [Cleanup] Deprecate non-maybe versions of HasReal*Property.
These functions have been marked V8_DEPRECATE_SOON for a long time,
now all uses have been removed from Chrome, mark them as deprecated.

BUG=v8:7287,v8:8238

Change-Id: I47b23588231ca510ec2475cb476e4134c05e162a
Reviewed-on: https://chromium-review.googlesource.com/c/1356517
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58154}
2018-12-11 13:40:43 +00:00
Ben L. Titzer
f68ee6e7e4 [typedarrays] Use Detach instead of Neuter
This is purely a renaming change. The ES spec uses the term 'detach'
for the process of removing the backing store of a typed array, while
V8 uses the historical term 'neuter'. Update our internal implementation,
including method names and flag names, to match the spec.

Note that some error messages still use the term 'neuter' since error
messages are asserted by some embedder tests, like layout tests.

R=bmeurer@chromium.org, yangguo@chromium.org, mstarzinger@chromium.org, mlippautz@chromium.org
BUG=chromium:913887

Change-Id: I62f1c3ac9ae67ba01d612a5221afa3d92deae272
Reviewed-on: https://chromium-review.googlesource.com/c/1370036
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58149}
2018-12-11 11:57:30 +00:00
Clemens Hammacher
cc636ba796 Fix cpplint errors that were not found so far
The class declaration regexp in cpplint did not catch classes decorated
by V8_EXPORT, V8_EXPORT_PRIVATE or any other decorator containing
digits.
This will be fixed in https://github.com/google/styleguide/pull/422.
This CL already prepares the code base by fixing all errors that will
be found after that change.
Some follow-up changes were needed to fix implicit conversion that are
not taken any more now.

R=mstarzinger@chromium.org

Bug: v8:8562
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I03713bd04dbc3f54b89a6c857a93463139aa5efd
Reviewed-on: https://chromium-review.googlesource.com/c/1367751
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58143}
2018-12-11 08:31:10 +00:00
Clemens Hammacher
255048c5e2 [api][wasm] Change ModuleCompiledCallback definition
This callback is not being used by now, so we can just change it
without the deprecation dance.
Instead of the WasmModuleObject, it now receives the new
CompiledWasmModule wrapper which contains a shared pointer to the
NativeModule. This is all that's needed for serialization.

Some classes are pulled out of WasmModuleObject to allow reuse.

R=adamk@chromium.org, mstarzinger@chromium.org
CC=​bbudge@chromium.org

Bug: chromium:912031
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Icedb64efa92e66bec45cf8742942a07ae22f59c8
Reviewed-on: https://chromium-review.googlesource.com/c/1363140
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58142}
2018-12-11 07:38:30 +00:00
Yuki Shiino
134c67ef8a Make Isolate::GetIncumbentContext() work well with MSan
https://crrev.com/c/1343709 fixed GetIncumbentContext to work
with ASan, however, GetIncumbentContext didn't work well with
MSan because MSan uses a simulator which supports yet another
separate stack frame.

This patch fixes GetIncumbentContext so that it works well
with not only ASan but also MSan simply following the same way
as v8::TryCatch does.

i::GetCurrentStackPosition() solves the issue of ASan and
SafeStack (native but separate stack frame), and
i::SimulatorStack solves the issue of MSan (simulator stack
frame).

Bug: chromium:888867, chromium:866610
Change-Id: Id803cbfd17fb1b1d9b8ee34c4802768f3a2f8e79
Reviewed-on: https://chromium-review.googlesource.com/c/1356691
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58096}
2018-12-07 14:52:25 +00:00
Jakob Gruber
a0858cf0ca [regexp] Add use counters for IsRegExp
A spec change to simplify IsRegExp has been proposed:

https://github.com/tc39/ecma262/pull/1318

This CL adds use counters for cases in which the spec change would
alter behavior:

1. o[@@match] is trueish but o is not a JSRegExp
2. o[@@match] is falseish (but not undefined) and o is a JSRegExp

This is the V8 side of required changes.
The Chromium-side CL: https://crrev.com/c/1360730

Drive-by: TNodeify IsRegExp.

Tbr: yangguo@chromium.org
Bug: v8:8522
Change-Id: I3766e02977f256a80d0e59472d3bafa9c692af9e
Reviewed-on: https://chromium-review.googlesource.com/c/1360630
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58064}
2018-12-06 08:15:37 +00:00
Clemens Hammacher
16afa0a226 [api][wasm] Rename WasmCompiledModule to WasmModuleObject
A WasmModuleObject represents an instance of WebAssembly.Module. It is
called WasmModuleObject internally, so also use that name externally.

We still have a typedef for WasmCompiledModule which will be deprecated
once chromium has been updated to use WasmModuleObject.

R=titzer@chromium.org, adamk@chromium.org

Bug: v8:8238, chromium:912031
Change-Id: I2d7708d4dc183cb4f4714f741b1ea0c153014430
Reviewed-on: https://chromium-review.googlesource.com/c/1362048
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58055}
2018-12-05 21:22:12 +00:00
Peter Marshall
54ded121ce [unwinder] Add bounds checking to the unwinder API
It's possible that we encounter incorrect SP or FP values while
unwinding the stack. One reason is that third-party code like virus
protection may change the stack. If we encounter values for SP or FP
that don't make sense, we should bail out of unwinding and return false.

Bug: v8:8116, chromium:909957
Change-Id: I630fef3f619382c7035be50b86072be349ed185c
Reviewed-on: https://chromium-review.googlesource.com/c/1358514
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58018}
2018-12-04 15:04:51 +00:00
Yang Guo
3d80831d02 [api] deprecate old v8::String::NewFromUtf8
R=delphick@chromium.org

Bug: v8:7281
Change-Id: I4af641218d4646d3cdf3a2776e9bc24141164638
Reviewed-on: https://chromium-review.googlesource.com/c/1357054
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58016}
2018-12-04 14:49:09 +00:00
Yang Guo
e84b92d765 [api] Remove deprecations from before version 7.2
R=delphick@chromium.org

Change-Id: Iad128dc76a8d399bbf18053fc1f32e34fa36c198
Reviewed-on: https://chromium-review.googlesource.com/c/1357056
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58015}
2018-12-04 14:41:12 +00:00
Jakob Gruber
5b343483f1 Remove remaining infrastructure for FunctionEntryHook
Bug: v8:8503, v8:7777
Change-Id: Iadf515cf4735d1046c7c14f44c02d5d5f95df87a
Reviewed-on: https://chromium-review.googlesource.com/c/1356512
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57969}
2018-11-30 14:29:13 +00:00
Aseem Garg
5b55ec2ac0 Reland "[wasm] Add I64AtomicWait implementation"
This is a reland of 9436e8a817

This CL simplifies the wasm/futex.js test so that it doesn't push the
limits of d8.

Original change's description:
> [wasm] Add I64AtomicWait implementation
>
> Bug=v8:8075
> R=adamk@chromium.org,binji@chromium.org
>
> Change-Id: I11ef5daccd043123b23e60c93ee0df79cabe9ccd
> Reviewed-on: https://chromium-review.googlesource.com/c/1342948
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Reviewed-by: Ben Smith <binji@chromium.org>
> Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57917}

Change-Id: Ifd26f1ecdb9fe24a1896162bb4d4285f9188a9ba
Reviewed-on: https://chromium-review.googlesource.com/c/1351304
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57953}
2018-11-30 02:24:04 +00:00
tzik
29ad898c88 Deprecate v8::Isolate::GetEnteredContext
This CL marks v8::Isolate::GetEnteredContext as deprecated in favor of
replacing it with GetEnteredOrMicrotaskContext. Blink no longer uses it,
and Node.js does not use this too.

GetEnteredOrMicrotaskContext() is relevant for all known cases over
GetEnteredContext(), and it costs 2% of a benchmark score to maintain
the entered contexts under the nestable microtask context.
https://crrev.com/c/1322290 is a context for the bencmark and nestable
microtask contexts.

Bug: v8:8124
Change-Id: I260e32daadf34dc587926a1e20ab950ff2e31699
Reviewed-on: https://chromium-review.googlesource.com/c/1353025
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57927}
2018-11-29 08:21:14 +00:00
Aseem Garg
f4775f1c10 Revert "[wasm] Add I64AtomicWait implementation"
This reverts commit 9436e8a817.

Reason for revert: Breaks TSAN.

Original change's description:
> [wasm] Add I64AtomicWait implementation
> 
> Bug=v8:8075
> R=​adamk@chromium.org,binji@chromium.org
> 
> Change-Id: I11ef5daccd043123b23e60c93ee0df79cabe9ccd
> Reviewed-on: https://chromium-review.googlesource.com/c/1342948
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Reviewed-by: Ben Smith <binji@chromium.org>
> Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57917}

TBR=binji@chromium.org,adamk@chromium.org,aseemgarg@chromium.org

Change-Id: Ic82ce8794410a0d4d19de07abd9bb8a7aaff1c1c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/1351303
Reviewed-by: Aseem Garg <aseemgarg@chromium.org>
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57919}
2018-11-29 01:10:39 +00:00