Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index b3f3b4b14020eb97daf391e2a95a8d9ce5ab1d00..3a90343b844998253fe4f498e9b2051be008a65b 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -40,12 +40,15 @@ |
namespace v8 { |
namespace internal { |
-MacroAssembler::MacroAssembler(void* buffer, int size) |
- : Assembler(Isolate::Current(), buffer, size), |
+MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size) |
+ : Assembler(arg_isolate, buffer, size), |
generating_stub_(false), |
allow_stub_calls_(true), |
- root_array_available_(true), |
- code_object_(isolate()->heap()->undefined_value()) { |
+ root_array_available_(true) { |
+ if (isolate() != NULL) { |
+ code_object_ = Handle<Object>(isolate()->heap()->undefined_value(), |
+ isolate()); |
+ } |
} |
@@ -2885,7 +2888,9 @@ void MacroAssembler::CallCFunction(Register function, int num_arguments) { |
CodePatcher::CodePatcher(byte* address, int size) |
- : address_(address), size_(size), masm_(address, size + Assembler::kGap) { |
+ : address_(address), |
+ size_(size), |
+ masm_(Isolate::Current(), address, size + Assembler::kGap) { |
// Create a new macro assembler pointing to the address of the code to patch. |
// The size is adjusted with kGap on order for the assembler to generate size |
// bytes of instructions without failing with buffer size constraints. |