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

Side by Side Diff: src/api.cc

Issue 101463003: Revert "Introduce API to temporarily interrupt long running JavaScript code." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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 | « include/v8.h ('k') | src/execution.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 6482 matching lines...) Expand 10 before | Expand all | Expand 10 after
6493 return IsExecutionTerminatingCheck(i_isolate); 6493 return IsExecutionTerminatingCheck(i_isolate);
6494 } 6494 }
6495 6495
6496 6496
6497 void V8::CancelTerminateExecution(Isolate* isolate) { 6497 void V8::CancelTerminateExecution(Isolate* isolate) {
6498 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); 6498 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
6499 i_isolate->stack_guard()->CancelTerminateExecution(); 6499 i_isolate->stack_guard()->CancelTerminateExecution();
6500 } 6500 }
6501 6501
6502 6502
6503 void Isolate::RequestInterrupt(InterruptCallback callback, void* data) {
6504 reinterpret_cast<i::Isolate*>(this)->stack_guard()->RequestInterrupt(
6505 callback, data);
6506 }
6507
6508
6509 void Isolate::ClearInterrupt() {
6510 reinterpret_cast<i::Isolate*>(this)->stack_guard()->ClearInterrupt();
6511 }
6512
6513
6514 Isolate* Isolate::GetCurrent() { 6503 Isolate* Isolate::GetCurrent() {
6515 i::Isolate* isolate = i::Isolate::UncheckedCurrent(); 6504 i::Isolate* isolate = i::Isolate::UncheckedCurrent();
6516 return reinterpret_cast<Isolate*>(isolate); 6505 return reinterpret_cast<Isolate*>(isolate);
6517 } 6506 }
6518 6507
6519 6508
6520 Isolate* Isolate::New() { 6509 Isolate* Isolate::New() {
6521 i::Isolate* isolate = new i::Isolate(); 6510 i::Isolate* isolate = new i::Isolate();
6522 return reinterpret_cast<Isolate*>(isolate); 6511 return reinterpret_cast<Isolate*>(isolate);
6523 } 6512 }
(...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after
7526 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7515 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7527 Address callback_address = 7516 Address callback_address =
7528 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7517 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7529 VMState<EXTERNAL> state(isolate); 7518 VMState<EXTERNAL> state(isolate);
7530 ExternalCallbackScope call_scope(isolate, callback_address); 7519 ExternalCallbackScope call_scope(isolate, callback_address);
7531 callback(info); 7520 callback(info);
7532 } 7521 }
7533 7522
7534 7523
7535 } } // namespace v8::internal 7524 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/execution.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698