From f5d85e0a1a69b1b3ddb97aa3535a49c2b786ab03 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 6 Mar 2013 11:19:02 +0100 Subject: [PATCH] Fix a bug in Persistent::New Change-Id: Iac13aa897e64bca6b50ea90bd5e2804e2212e008 Reviewed-by: Simon Hausmann --- src/v4/qv4v8.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/v4/qv4v8.h b/src/v4/qv4v8.h index 1ee683f..810dfb2 100644 --- a/src/v4/qv4v8.h +++ b/src/v4/qv4v8.h @@ -509,7 +509,10 @@ template class Persistent : public Handle { */ static Persistent New(Handle that) { - return Persistent(that); + Persistent result; + result.Handle::operator =(that); + HandleOperations::protect(&result); + return result; } /** -- 2.7.4