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

Side by Side Diff: src/api.cc

Issue 583183002: Temporary hack to avoid PDFium crashing (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 // 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 #include "src/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 6549 matching lines...) Expand 10 before | Expand all | Expand 10 after
6560 } 6560 }
6561 6561
6562 6562
6563 Isolate* Isolate::GetCurrent() { 6563 Isolate* Isolate::GetCurrent() {
6564 i::Isolate* isolate = i::Isolate::Current(); 6564 i::Isolate* isolate = i::Isolate::Current();
6565 return reinterpret_cast<Isolate*>(isolate); 6565 return reinterpret_cast<Isolate*>(isolate);
6566 } 6566 }
6567 6567
6568 6568
6569 Isolate* Isolate::New(const Isolate::CreateParams& params) { 6569 Isolate* Isolate::New(const Isolate::CreateParams& params) {
6570 // TODO(jochen): Remove again soon.
6571 V8::Initialize();
6572
6570 i::Isolate* isolate = new i::Isolate(); 6573 i::Isolate* isolate = new i::Isolate();
6571 Isolate* v8_isolate = reinterpret_cast<Isolate*>(isolate); 6574 Isolate* v8_isolate = reinterpret_cast<Isolate*>(isolate);
6572 if (params.entry_hook) { 6575 if (params.entry_hook) {
6573 isolate->set_function_entry_hook(params.entry_hook); 6576 isolate->set_function_entry_hook(params.entry_hook);
6574 } 6577 }
6575 if (params.code_event_handler) { 6578 if (params.code_event_handler) {
6576 isolate->InitializeLoggingAndCounters(); 6579 isolate->InitializeLoggingAndCounters();
6577 isolate->logger()->SetCodeEventHandler(kJitCodeEventDefault, 6580 isolate->logger()->SetCodeEventHandler(kJitCodeEventDefault,
6578 params.code_event_handler); 6581 params.code_event_handler);
6579 } 6582 }
(...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after
7655 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7658 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7656 Address callback_address = 7659 Address callback_address =
7657 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7660 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7658 VMState<EXTERNAL> state(isolate); 7661 VMState<EXTERNAL> state(isolate);
7659 ExternalCallbackScope call_scope(isolate, callback_address); 7662 ExternalCallbackScope call_scope(isolate, callback_address);
7660 callback(info); 7663 callback(info);
7661 } 7664 }
7662 7665
7663 7666
7664 } } // namespace v8::internal 7667 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698