JSActivation constructor should use NotNull placement new.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Nov 2013 15:05:53 +0000 (15:05 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Nov 2013 15:05:53 +0000 (15:05 +0000)
<https://webkit.org/b/124909>

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

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/JSActivation.h

index 1eccd0b188e5230368eb63f15297cc81fccb7ea1..4aa0c4be67f74c787a53a74fbb5f65b0d980449a 100644 (file)
@@ -1,3 +1,12 @@
+2013-11-27  Andreas Kling  <akling@apple.com>
+
+        JSActivation constructor should use NotNull placement new.
+        <https://webkit.org/b/124909>
+
+        Knock a null check outta the storage initialization loop.
+
+        Reviewed by Antti Koivisto.
+
 2013-11-26  Filip Pizlo  <fpizlo@apple.com>
 
         Restructure global variable constant inference so that it could work for any kind of symbol table variable
 2013-11-26  Filip Pizlo  <fpizlo@apple.com>
 
         Restructure global variable constant inference so that it could work for any kind of symbol table variable
index 3e42f40120e5928aeb3c8aa7f19afd49c39e01fb..434a6c953fbc3d727f2cc0a2a7f2751736dcc47c 100644 (file)
@@ -122,7 +122,7 @@ inline JSActivation::JSActivation(VM& vm, CallFrame* callFrame, Register* regist
     WriteBarrier<Unknown>* storage = this->storage();
     size_t captureCount = symbolTable->captureCount();
     for (size_t i = 0; i < captureCount; ++i)
     WriteBarrier<Unknown>* storage = this->storage();
     size_t captureCount = symbolTable->captureCount();
     for (size_t i = 0; i < captureCount; ++i)
-        new(&storage[i]) WriteBarrier<Unknown>;
+        new (NotNull, &storage[i]) WriteBarrier<Unknown>;
 }
 
 JSActivation* asActivation(JSValue);
 }
 
 JSActivation* asActivation(JSValue);