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

Side by Side Diff: src/api.cc

Issue 143403002: Update Isolate::RequestGarbageCollection after r18691 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/extensions/gc-extension.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 6426 matching lines...) Expand 10 before | Expand all | Expand 10 after
6437 6437
6438 void Isolate::RequestGarbageCollectionForTesting(GarbageCollectionType type) { 6438 void Isolate::RequestGarbageCollectionForTesting(GarbageCollectionType type) {
6439 CHECK(i::FLAG_expose_gc); 6439 CHECK(i::FLAG_expose_gc);
6440 if (type == kMinorGarbageCollection) { 6440 if (type == kMinorGarbageCollection) {
6441 reinterpret_cast<i::Isolate*>(this)->heap()->CollectGarbage( 6441 reinterpret_cast<i::Isolate*>(this)->heap()->CollectGarbage(
6442 i::NEW_SPACE, "Isolate::RequestGarbageCollection", 6442 i::NEW_SPACE, "Isolate::RequestGarbageCollection",
6443 kGCCallbackFlagForced); 6443 kGCCallbackFlagForced);
6444 } else { 6444 } else {
6445 ASSERT_EQ(kFullGarbageCollection, type); 6445 ASSERT_EQ(kFullGarbageCollection, type);
6446 reinterpret_cast<i::Isolate*>(this)->heap()->CollectAllGarbage( 6446 reinterpret_cast<i::Isolate*>(this)->heap()->CollectAllGarbage(
6447 i::Heap::kNoGCFlags, "Isolate::RequestGarbageCollection", 6447 i::Heap::kAbortIncrementalMarkingMask,
6448 kGCCallbackFlagForced); 6448 "Isolate::RequestGarbageCollection", kGCCallbackFlagForced);
6449 } 6449 }
6450 } 6450 }
6451 6451
6452 6452
6453 Isolate* Isolate::GetCurrent() { 6453 Isolate* Isolate::GetCurrent() {
6454 i::Isolate* isolate = i::Isolate::UncheckedCurrent(); 6454 i::Isolate* isolate = i::Isolate::UncheckedCurrent();
6455 return reinterpret_cast<Isolate*>(isolate); 6455 return reinterpret_cast<Isolate*>(isolate);
6456 } 6456 }
6457 6457
6458 6458
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
7454 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7454 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7455 Address callback_address = 7455 Address callback_address =
7456 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7456 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7457 VMState<EXTERNAL> state(isolate); 7457 VMState<EXTERNAL> state(isolate);
7458 ExternalCallbackScope call_scope(isolate, callback_address); 7458 ExternalCallbackScope call_scope(isolate, callback_address);
7459 callback(info); 7459 callback(info);
7460 } 7460 }
7461 7461
7462 7462
7463 } } // namespace v8::internal 7463 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/extensions/gc-extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698