LinkBuffer should not keep a reference to the MacroAssembler
[WebKit-https.git] / Source / JavaScriptCore / jit / RegisterPreservationWrapperGenerator.cpp
index a401ea6..070b5cb 100644 (file)
@@ -124,7 +124,7 @@ MacroAssemblerCodeRef generateRegisterPreservationWrapper(VM& vm, ExecutableBase
     jit.restoreReturnAddressBeforeReturn(GPRInfo::nonArgGPR0);
     AssemblyHelpers::Jump jump = jit.jump();
     
-    LinkBuffer linkBuffer(vm, &jit, GLOBAL_THUNK_ID);
+    LinkBuffer linkBuffer(vm, jit, GLOBAL_THUNK_ID);
     linkBuffer.link(jump, CodeLocationLabel(target));
 
     if (Options::verboseFTLToJSThunk())
@@ -226,7 +226,7 @@ MacroAssemblerCodeRef registerRestorationThunkGenerator(VM* vm)
 {
     AssemblyHelpers jit(vm, 0);
     generateRegisterRestoration(jit);
-    LinkBuffer linkBuffer(*vm, &jit, GLOBAL_THUNK_ID);
+    LinkBuffer linkBuffer(*vm, jit, GLOBAL_THUNK_ID);
     return FINALIZE_CODE(linkBuffer, ("Register restoration thunk"));
 }