From 761b3afca59ba1c24337ff3afe0c91d005f7718b Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sat, 8 Jun 2019 23:46:41 -0400 Subject: 1320408 - Part 18: Change StringObject::init to static method. --- js/src/jsstr.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'js/src/jsstr.cpp') diff --git a/js/src/jsstr.cpp b/js/src/jsstr.cpp index fdb62a679..74f61b87d 100644 --- a/js/src/jsstr.cpp +++ b/js/src/jsstr.cpp @@ -2918,7 +2918,10 @@ js::InitStringClass(JSContext* cx, HandleObject obj) Rooted empty(cx, cx->runtime()->emptyString); RootedObject proto(cx, GlobalObject::createBlankPrototype(cx, global, &StringObject::class_)); - if (!proto || !proto->as().init(cx, empty)) + if (!proto) + return nullptr; + Handle protoObj = proto.as(); + if (!StringObject::init(cx, protoObj, empty)) return nullptr; /* Now create the String function. */ -- cgit v1.2.3