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

Unified Diff: src/disassembler.cc

Issue 435003: Patch for allowing several V8 instances in process:... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/disassembler.h ('k') | src/execution.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/disassembler.cc
===================================================================
--- src/disassembler.cc (revision 3427)
+++ src/disassembler.cc (working copy)
@@ -65,7 +65,8 @@
const char* V8NameConverter::NameOfAddress(byte* pc) const {
- static v8::internal::EmbeddedVector<char, 128> buffer;
+ v8::internal::EmbeddedVector<char, 128> buffer =
+ v8_context()->disassembler_data_->buffer_;
const char* name = Builtins::Lookup(pc);
if (name != NULL) {
@@ -307,6 +308,14 @@
DecodeIt(f, v8NameConverter, begin, end);
}
+void Disassembler::PostConstruct() {
+ v8_context()->disassembler_data_ = new disasm::DisassemblerData();
+}
+
+void Disassembler::PreDestroy() {
+ delete v8_context()->disassembler_data_;
+}
+
#else // ENABLE_DISASSEMBLER
void Disassembler::Dump(FILE* f, byte* begin, byte* end) {}
« no previous file with comments | « src/disassembler.h ('k') | src/execution.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698