Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: include/v8.h

Issue 1883173002: [api] Bring back finalizers on global handles (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/global-handles.h » ('j') | src/global-handles.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** \mainpage V8 API Reference Guide 5 /** \mainpage V8 API Reference Guide
6 * 6 *
7 * V8 is Google's open source JavaScript engine. 7 * V8 is Google's open source JavaScript engine.
8 * 8 *
9 * This set of documents provides reference material generated from the 9 * This set of documents provides reference material generated from the
10 * V8 header file, include/v8.h. 10 * V8 header file, include/v8.h.
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 Isolate* isolate_; 473 Isolate* isolate_;
474 P* parameter_; 474 P* parameter_;
475 Local<T> handle_; 475 Local<T> handle_;
476 }; 476 };
477 477
478 478
479 // TODO(dcarney): delete this with WeakCallbackData 479 // TODO(dcarney): delete this with WeakCallbackData
480 template <class T> 480 template <class T>
481 using PhantomCallbackData = WeakCallbackInfo<T>; 481 using PhantomCallbackData = WeakCallbackInfo<T>;
482 482
483 483 // kParameter will pass a void* parameter back to the callback, kInternalFields
484 enum class WeakCallbackType { kParameter, kInternalFields }; 484 // will pass the first two internal fields back to the callback, kFinalizer
485 485 // will pass a void* parameter back, but is invoked before the object is
486 // actually collected, so it can be resurrected. In the last case, it is not
487 // possible to request a second pass callback.
488 enum class WeakCallbackType { kParameter, kInternalFields, kFinalizer };
486 489
487 /** 490 /**
488 * An object reference that is independent of any handle scope. Where 491 * An object reference that is independent of any handle scope. Where
489 * a Local handle only lives as long as the HandleScope in which it was 492 * a Local handle only lives as long as the HandleScope in which it was
490 * allocated, a PersistentBase handle remains valid until it is explicitly 493 * allocated, a PersistentBase handle remains valid until it is explicitly
491 * disposed. 494 * disposed.
492 * 495 *
493 * A persistent handle contains a reference to a storage cell within 496 * A persistent handle contains a reference to a storage cell within
494 * the v8 engine which holds an object value and which is updated by 497 * the v8 engine which holds an object value and which is updated by
495 * the garbage collector whenever the object is moved. A new storage 498 * the garbage collector whenever the object is moved. A new storage
(...skipping 8274 matching lines...) Expand 10 before | Expand all | Expand 10 after
8770 */ 8773 */
8771 8774
8772 8775
8773 } // namespace v8 8776 } // namespace v8
8774 8777
8775 8778
8776 #undef TYPE_CHECK 8779 #undef TYPE_CHECK
8777 8780
8778 8781
8779 #endif // INCLUDE_V8_H_ 8782 #endif // INCLUDE_V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/global-handles.h » ('j') | src/global-handles.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698