From: akling@apple.com Date: Wed, 27 Nov 2013 15:05:53 +0000 (+0000) Subject: JSActivation constructor should use NotNull placement new. X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=commitdiff_plain;h=bcf825f906ac7e9cf58dea1cf11536214d838f7f JSActivation constructor should use NotNull placement new. Knock a null check outta the storage initialization loop. Reviewed by Antti Koivisto. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@159813 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog index 1eccd0b188e5..4aa0c4be67f7 100644 --- a/Source/JavaScriptCore/ChangeLog +++ b/Source/JavaScriptCore/ChangeLog @@ -1,3 +1,12 @@ +2013-11-27 Andreas Kling + + JSActivation constructor should use NotNull placement new. + + + Knock a null check outta the storage initialization loop. + + Reviewed by Antti Koivisto. + 2013-11-26 Filip Pizlo Restructure global variable constant inference so that it could work for any kind of symbol table variable diff --git a/Source/JavaScriptCore/runtime/JSActivation.h b/Source/JavaScriptCore/runtime/JSActivation.h index 3e42f40120e5..434a6c953fbc 100644 --- a/Source/JavaScriptCore/runtime/JSActivation.h +++ b/Source/JavaScriptCore/runtime/JSActivation.h @@ -122,7 +122,7 @@ inline JSActivation::JSActivation(VM& vm, CallFrame* callFrame, Register* regist WriteBarrier* storage = this->storage(); size_t captureCount = symbolTable->captureCount(); for (size_t i = 0; i < captureCount; ++i) - new(&storage[i]) WriteBarrier; + new (NotNull, &storage[i]) WriteBarrier; } JSActivation* asActivation(JSValue);