- 30 Jul, 2019 1 commit
-
-
Sathya Gunasekaran authored
Previously, this was run as a microtask and this CL changes it to run as a separate task as mandated by the current WeakRef spec. This CL also introduces a FinalizationGroup type to the V8 API representing the JSFinalizationGroup. This has a `Cleanup` function that runs the cleanup callback associated with it. SetHostCleanupFinalizationGroupCallback is added to set the embedder defined HostCleanupFinalizationGroupCallback. ClearKeptObject is exposed on the v8::Isolate to reset the strongly held set of objects. The general workflow is the following: (a) When the GC notices that a given finalization group has dirty cells, it calls HostCleanupFinalizationGroupCallback with the given finalization group. (b) As part of HostCleanupFinalizationGroupCallback, the embedder enqueues a task that at some point later calls FinalizationGroup::Cleanup. (c) At some point in the future, FinalizationGroup::Cleanup is called, which runs the cleanup callback of the finalization group. This patch also includes d8 changes to use these new APIs. Currently, d8 cycles through the enqueued finalization groups after a synchronous turn (and it's microtask checkpoint) and runs the cleanup callbacks. Change-Id: I06eb4da2c103b2792a9c62bc4b98fd4e5c4892fc Bug: v8:8179 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1655655 Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Hannes Payer <hpayer@chromium.org> Cr-Commit-Position: refs/heads/master@{#62984}
-
- 23 Jul, 2019 1 commit
-
-
Sathya Gunasekaran authored
Bug: v8:8179 Change-Id: I6a4d7e899076fadf848c187f9f4d86a676455215 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1714865Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#62870}
-
- 13 Jun, 2019 2 commits
-
-
Sathya Gunasekaran authored
Align with the spec defined names. Bug: v8:8179 Change-Id: I892a2627c7712112b47a87e7a658dc4066540482 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1655654Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#62136}
-
Sathya Gunasekaran authored
- Return true or false, not undefined - Check that unregister token is an object Bug: v8:8179 Change-Id: I1a4ff7730158dba16efb552fb2f4892c8d31412c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1653120Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#62135}
-
- 12 Jun, 2019 1 commit
-
-
Sathya Gunasekaran authored
Make sure to use the callback passed to cleanupSome Bug: v8:8179 Change-Id: Ia5d90b56edf80e05bdaf0dc520b555c29042b64c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1655306Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#62122}
-
- 23 May, 2019 1 commit
-
-
Clemens Hammacher authored
This CL was generated by an automatic clang AST rewriter using this matcher expression: callExpr( callee( cxxMethodDecl( hasName("operator->"), ofClass(isSameOrDerivedFrom("v8::internal::Object")) ) ), argumentCountIs(1) ) The "->" at the expression location was then rewritten to ".". R=jkummerow@chromium.org TBR=mstarzinger@chromium.org,verwaest@chromium.org,yangguo@chromium.org Bug: v8:9183, v8:3770 No-Try: true No-Tree-Checks: true Change-Id: I0a7ecabdeafe51d0cf427f5280af0c7cab96869e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624209Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Yang Guo <yangguo@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#61764}
-
- 20 May, 2019 1 commit
-
-
Yang Guo authored
TBR=verwaest@chromium.org,rmcilroy@chromium.org NOTREECHECKS=true NOPRESUBMIT=true Bug: v8:9247 Change-Id: I9ddfb6e56ca8e47c4ac186a8df5f442d26420a69 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1617661 Commit-Queue: Yang Guo <yangguo@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#61642}
-
- 17 May, 2019 2 commits
-
-
Yang Guo authored
This reverts commit 5f285395. Reason for revert: presubmit failure Original change's description: > Move logging and diagnostics related source files > > This also introduces a COMMON_OWNERS file, which is derived from the > current top-level OWNERS file. It is to be used for parts of the > codebase that is not sensitive to domain-specific expertise. > > NOPRESUBMIT=true > TBR=verwaest@chromium.org > > Bug: v8:9247 > Change-Id: I34a5eaa7cb1509a80d15094a2aceedd62665b17c > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1613987 > Reviewed-by: Yang Guo <yangguo@chromium.org> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> > Commit-Queue: Yang Guo <yangguo@chromium.org> > Cr-Commit-Position: refs/heads/master@{#61600} TBR=rmcilroy@chromium.org,yangguo@chromium.org,mstarzinger@chromium.org,verwaest@chromium.org Change-Id: I3827c3af4fd63b18aa48c49617f318a01746e813 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:9247 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1617247Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#61601}
-
Yang Guo authored
This also introduces a COMMON_OWNERS file, which is derived from the current top-level OWNERS file. It is to be used for parts of the codebase that is not sensitive to domain-specific expertise. NOPRESUBMIT=true TBR=verwaest@chromium.org Bug: v8:9247 Change-Id: I34a5eaa7cb1509a80d15094a2aceedd62665b17c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1613987Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Commit-Queue: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#61600}
-
- 31 Jan, 2019 1 commit
-
-
Marja Hölttä authored
1) JSWeakRef and WeakCell targets are HeapObjects (SMIs are no longer used for signalling cleared / dead JSWeakRefs / WeakCells.) Make this explicit. 2) There's no need to assert that the target of JSWeakRef cannot be undefined when handled by MarkCompactCollector::ClearJSWeakRefs, since the code handles undefined just fine. (The removed comment was true though, since this is the only place which can set the target to undefined. But maybe in the future there's some other way to clear a JSWeakRef, e.g., explicit API for it.) BUG=v8:8179 Change-Id: I762c2b4487770712c7538be799dc188943c92587 Reviewed-on: https://chromium-review.googlesource.com/c/1445986Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Commit-Queue: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#59237}
-
- 30 Jan, 2019 1 commit
-
-
Marja Hölttä authored
This replaces WeakFactory with FinalizationGroup. New API is here: https://weakrefs.netlify.com/ BUG=v8:8179 Change-Id: I8c1c4a70deb42581d17117423dd29d93bdd35cb0 Reviewed-on: https://chromium-review.googlesource.com/c/1435938Reviewed-by: Maya Lekova <mslekova@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Commit-Queue: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#59204}
-
- 17 Dec, 2018 1 commit
-
-
Marja Hölttä authored
New API is here: https://github.com/tc39/proposal-weakrefs/issues/55 The WeakCell parts stay in the old API, resulting in temporary code duplication in some parts. Those parts will go away once the WeakCell-related parts are migrated to the new API (but the spec needs some work first). BUG=v8:8179 Change-Id: I81ca824a14d830e3c5fa515d5ad7e5f78c10e19d Reviewed-on: https://chromium-review.googlesource.com/c/1378171 Commit-Queue: Marja Hölttä <marja@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#58264}
-
- 13 Nov, 2018 2 commits
-
-
Marja Hölttä authored
BUG=v8:8179 Change-Id: I7dc024fe4880a787cadac8b79bca6da87e2d36de Reviewed-on: https://chromium-review.googlesource.com/c/1328926 Commit-Queue: Marja Hölttä <marja@chromium.org> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#57476}
-
Marja Hölttä authored
This reduces the build steps after touching counters.h from 710 to 191, thus detaching counters.h from the giant include cluster. BUG=v8:7490,v8:8238 Change-Id: I0c7e707fb945e293f8a5604cc8da438cd35b3210 Reviewed-on: https://chromium-review.googlesource.com/c/1329695 Commit-Queue: Marja Hölttä <marja@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#57468}
-
- 08 Nov, 2018 1 commit
-
-
Marja Hölttä authored
See https://github.com/tc39/proposal-weakrefs/issues/37 Drive-by: fix error messages. BUG=v8:8179 Change-Id: I8608d09ec5a58c8b62eea4580be9415f6bb41586 Reviewed-on: https://chromium-review.googlesource.com/c/1319758 Commit-Queue: Marja Hölttä <marja@chromium.org> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#57347}
-
- 05 Nov, 2018 1 commit
-
-
Marja Hölttä authored
- Add the WeakRef class and its deref() function. - Add WeakFactory.prototype.makeRef - Implement the "keep during job" behavior for WeakRef constructor and deref(). - Here we keep the targets alive longer than until the end of the job (microtask), contradicting the spec. However, this is probably the indended behavior, see https://github.com/tc39/proposal-weakrefs/issues/39 . BUG=v8:8179 Change-Id: I41990d41ac1799e34f675d8431b9a7aa7ed3d48d Reviewed-on: https://chromium-review.googlesource.com/c/1306435 Commit-Queue: Marja Hölttä <marja@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#57242}
-
- 29 Oct, 2018 1 commit
-
-
Marja Hölttä authored
- Store dirty JSWeakFactories in a heap root (not native context) - during GC there's no native context necessarily. - Schedule one microtask per JSWeakFactory. - Enter the context of the cleanup function before calling it. BUG=v8:8179 Change-Id: Icaa245a08a60dd7325af828858ebe55d842c5bf6 Reviewed-on: https://chromium-review.googlesource.com/c/1298899 Commit-Queue: Marja Hölttä <marja@chromium.org> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#57081}
-
- 23 Oct, 2018 1 commit
-
-
Marja Hölttä authored
Previous version: https://chromium-review.googlesource.com/c/v8/v8/+/1292058 BUG=v8:8179 TBR=hpayer@chromium.org, gsathya@chromium.org Change-Id: Ia79b75a0630c5926e59206c29053addc88bfb6fe Reviewed-on: https://chromium-review.googlesource.com/c/1296210Reviewed-by: Marja Hölttä <marja@chromium.org> Reviewed-by: Hannes Payer <hpayer@chromium.org> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Commit-Queue: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#56886}
-
- 22 Oct, 2018 2 commits
-
-
Marja Hölttä authored
This reverts commit 49bd7f50. Reason for revert: breaks nonintl build since the added string is inside wrong ifdefs Original change's description: > [js weak refs] Add WeakCell.clear() > > BUG=v8:8179 > > Change-Id: Ic0d9af273a8a92177bf60e4be0dd5bddaf31868c > Reviewed-on: https://chromium-review.googlesource.com/c/1292058 > Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> > Reviewed-by: Hannes Payer <hpayer@chromium.org> > Commit-Queue: Marja Hölttä <marja@chromium.org> > Cr-Commit-Position: refs/heads/master@{#56853} TBR=marja@chromium.org,hpayer@chromium.org,gsathya@chromium.org Change-Id: I7d6831cfd8a5263ee327c2a80274d1cd10dd65cc No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:8179 Reviewed-on: https://chromium-review.googlesource.com/c/1293573Reviewed-by: Marja Hölttä <marja@chromium.org> Commit-Queue: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#56855}
-
Marja Hölttä authored
BUG=v8:8179 Change-Id: Ic0d9af273a8a92177bf60e4be0dd5bddaf31868c Reviewed-on: https://chromium-review.googlesource.com/c/1292058Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Reviewed-by: Hannes Payer <hpayer@chromium.org> Commit-Queue: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#56853}
-
- 18 Oct, 2018 1 commit
-
-
Marja Hölttä authored
If the user's cleanup function didn't iterate all available WeakCells, we need to schedule the cleanup task again at some point. The previous condition resulted it never being scheduled. BUG=v8:8179 Change-Id: I8f5f4c01d1eb6a3cca8bd21bdc52c38663889882 Reviewed-on: https://chromium-review.googlesource.com/c/1286686 Commit-Queue: Marja Hölttä <marja@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#56772}
-
- 17 Oct, 2018 1 commit
-
-
Marja Hölttä authored
BUG=v8:8179 Change-Id: I29c5a5359a6e682ec6d94e9779f921889546b6a7 Reviewed-on: https://chromium-review.googlesource.com/c/1278393Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Commit-Queue: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#56711}
-
- 16 Oct, 2018 1 commit
-
-
Marja Hölttä authored
BUG=v8:8179 Change-Id: I528e64fafff2dc00808c48107799d39603f0ca48 Reviewed-on: https://chromium-review.googlesource.com/c/1275823 Commit-Queue: Marja Hölttä <marja@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#56697}
-
- 11 Oct, 2018 1 commit
-
-
Marja Hölttä authored
These test mainly the data structures of JSWeakFactory / JSWeakCell. BUG=v8:8179 Change-Id: I20ffd07c18bbb2e21c69d11aa65d1e245203cc82 Reviewed-on: https://chromium-review.googlesource.com/c/1267939 Commit-Queue: Marja Hölttä <marja@chromium.org> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#56569}
-
- 09 Oct, 2018 1 commit
-
-
Marja Hölttä authored
Minimal implementation to run a simple example (see test) demonstrating the weakness of WeakCell. - Behind FLAG_harmony_weak_refs - Add WeakFactory & WeakCell, no WeakRef in this version. Spec clarifications: goo.gl/7ujBAk Design doc: goo.gl/nvof2T BUG=v8:8179 Change-Id: Iea2a7a2201e6380644235d190a542ab46e082382 Reviewed-on: https://chromium-review.googlesource.com/c/1238579Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Hannes Payer <hpayer@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#56483}
-