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

Side by Side Diff: test/cctest/test-deoptimization.cc

Issue 2310143002: [heap] Introduce enum of garbage collection reasons. (Closed)
Patch Set: rebase Created 4 years, 3 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 | « test/cctest/test-decls.cc ('k') | test/cctest/test-dictionary.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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 private: 102 private:
103 bool allow_natives_syntax_; 103 bool allow_natives_syntax_;
104 bool turbo_inlining_; 104 bool turbo_inlining_;
105 bool use_inlining_; 105 bool use_inlining_;
106 }; 106 };
107 107
108 108
109 // Abort any ongoing incremental marking to make sure that all weak global 109 // Abort any ongoing incremental marking to make sure that all weak global
110 // handle callbacks are processed. 110 // handle callbacks are processed.
111 static void NonIncrementalGC(i::Isolate* isolate) { 111 static void NonIncrementalGC(i::Isolate* isolate) {
112 isolate->heap()->CollectAllGarbage(); 112 isolate->heap()->CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask,
113 i::GarbageCollectionReason::kTesting);
113 } 114 }
114 115
115 116
116 static Handle<JSFunction> GetJSFunction(v8::Local<v8::Context> context, 117 static Handle<JSFunction> GetJSFunction(v8::Local<v8::Context> context,
117 const char* property_name) { 118 const char* property_name) {
118 v8::Local<v8::Function> fun = v8::Local<v8::Function>::Cast( 119 v8::Local<v8::Function> fun = v8::Local<v8::Function>::Cast(
119 context->Global()->Get(context, v8_str(property_name)).ToLocalChecked()); 120 context->Global()->Get(context, v8_str(property_name)).ToLocalChecked());
120 return i::Handle<i::JSFunction>::cast(v8::Utils::OpenHandle(*fun)); 121 return i::Handle<i::JSFunction>::cast(v8::Utils::OpenHandle(*fun));
121 } 122 }
122 123
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 .FromJust()); 926 .FromJust());
926 CHECK_EQ(13, env->Global() 927 CHECK_EQ(13, env->Global()
927 ->Get(env.local(), v8_str("result")) 928 ->Get(env.local(), v8_str("result"))
928 .ToLocalChecked() 929 .ToLocalChecked()
929 ->Int32Value(env.local()) 930 ->Int32Value(env.local())
930 .FromJust()); 931 .FromJust());
931 } 932 }
932 isolate->Exit(); 933 isolate->Exit();
933 isolate->Dispose(); 934 isolate->Dispose();
934 } 935 }
OLDNEW
« no previous file with comments | « test/cctest/test-decls.cc ('k') | test/cctest/test-dictionary.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698