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

Side by Side Diff: src/global-handles.h

Issue 998253006: two pass phantom collection (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix debugger Created 5 years, 9 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 | « src/debug.cc ('k') | src/global-handles.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 #ifndef V8_GLOBAL_HANDLES_H_ 5 #ifndef V8_GLOBAL_HANDLES_H_
6 #define V8_GLOBAL_HANDLES_H_ 6 #define V8_GLOBAL_HANDLES_H_
7 7
8 #include "include/v8.h" 8 #include "include/v8.h"
9 #include "include/v8-profiler.h" 9 #include "include/v8-profiler.h"
10 10
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 342
343 friend class Isolate; 343 friend class Isolate;
344 344
345 DISALLOW_COPY_AND_ASSIGN(GlobalHandles); 345 DISALLOW_COPY_AND_ASSIGN(GlobalHandles);
346 }; 346 };
347 347
348 348
349 class GlobalHandles::PendingPhantomCallback { 349 class GlobalHandles::PendingPhantomCallback {
350 public: 350 public:
351 typedef v8::WeakCallbackInfo<void> Data; 351 typedef v8::WeakCallbackInfo<void> Data;
352 PendingPhantomCallback(Node* node, Data data, Data::Callback callback) 352 PendingPhantomCallback(
353 : node_(node), data_(data), callback_(callback) {} 353 Node* node, Data::Callback callback, void* parameter,
354 void* internal_fields[v8::kInternalFieldsInWeakCallback])
355 : node_(node), callback_(callback), parameter_(parameter) {
356 for (int i = 0; i < v8::kInternalFieldsInWeakCallback; ++i) {
357 internal_fields_[i] = internal_fields[i];
358 }
359 }
354 360
355 void invoke(); 361 void Invoke(Isolate* isolate);
356 362
357 Node* node() { return node_; } 363 Node* node() { return node_; }
364 Data::Callback callback() { return callback_; }
358 365
359 private: 366 private:
360 Node* node_; 367 Node* node_;
361 Data data_;
362 Data::Callback callback_; 368 Data::Callback callback_;
369 void* parameter_;
370 void* internal_fields_[v8::kInternalFieldsInWeakCallback];
363 }; 371 };
364 372
365 373
366 class EternalHandles { 374 class EternalHandles {
367 public: 375 public:
368 enum SingletonHandle { 376 enum SingletonHandle {
369 I18N_TEMPLATE_ONE, 377 I18N_TEMPLATE_ONE,
370 I18N_TEMPLATE_TWO, 378 I18N_TEMPLATE_TWO,
371 DATE_CACHE_VERSION, 379 DATE_CACHE_VERSION,
372 380
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 List<int> new_space_indices_; 437 List<int> new_space_indices_;
430 int singleton_handles_[NUMBER_OF_SINGLETON_HANDLES]; 438 int singleton_handles_[NUMBER_OF_SINGLETON_HANDLES];
431 439
432 DISALLOW_COPY_AND_ASSIGN(EternalHandles); 440 DISALLOW_COPY_AND_ASSIGN(EternalHandles);
433 }; 441 };
434 442
435 443
436 } } // namespace v8::internal 444 } } // namespace v8::internal
437 445
438 #endif // V8_GLOBAL_HANDLES_H_ 446 #endif // V8_GLOBAL_HANDLES_H_
OLDNEW
« no previous file with comments | « src/debug.cc ('k') | src/global-handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698