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

Side by Side Diff: src/execution.cc

Issue 154283002: V8 Microtask Queue & API (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: heapconst Created 6 years, 10 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 | « src/execution.h ('k') | src/heap.h » ('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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 isolate, 361 isolate,
362 isolate->run_microtasks(), 362 isolate->run_microtasks(),
363 isolate->factory()->undefined_value(), 363 isolate->factory()->undefined_value(),
364 0, 364 0,
365 NULL, 365 NULL,
366 &threw); 366 &threw);
367 ASSERT(!threw); 367 ASSERT(!threw);
368 } 368 }
369 369
370 370
371 void Execution::EnqueueMicrotask(Isolate* isolate, Handle<Object> microtask) {
372 bool threw = false;
373 Handle<Object> args[] = { microtask };
374 Execution::Call(
375 isolate,
376 isolate->enqueue_external_microtask(),
377 isolate->factory()->undefined_value(),
378 1,
379 args,
380 &threw);
381 ASSERT(!threw);
382 }
383
384
371 bool StackGuard::IsStackOverflow() { 385 bool StackGuard::IsStackOverflow() {
372 ExecutionAccess access(isolate_); 386 ExecutionAccess access(isolate_);
373 return (thread_local_.jslimit_ != kInterruptLimit && 387 return (thread_local_.jslimit_ != kInterruptLimit &&
374 thread_local_.climit_ != kInterruptLimit); 388 thread_local_.climit_ != kInterruptLimit);
375 } 389 }
376 390
377 391
378 void StackGuard::EnableInterrupts() { 392 void StackGuard::EnableInterrupts() {
379 ExecutionAccess access(isolate_); 393 ExecutionAccess access(isolate_);
380 if (has_pending_interrupts(access)) { 394 if (has_pending_interrupts(access)) {
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 ASSERT(isolate->concurrent_recompilation_enabled()); 1048 ASSERT(isolate->concurrent_recompilation_enabled());
1035 stack_guard->Continue(INSTALL_CODE); 1049 stack_guard->Continue(INSTALL_CODE);
1036 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions(); 1050 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions();
1037 } 1051 }
1038 isolate->runtime_profiler()->OptimizeNow(); 1052 isolate->runtime_profiler()->OptimizeNow();
1039 return isolate->heap()->undefined_value(); 1053 return isolate->heap()->undefined_value();
1040 } 1054 }
1041 1055
1042 1056
1043 } } // namespace v8::internal 1057 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/execution.h ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698