Commit ff6028ff authored by Richard Townsend's avatar Richard Townsend Committed by Commit Bot

fixup alloca => _alloca for Windows on Arm

Windows inconsistently #define's _alloca as alloca in malloc.h, the
conditions required are not present on Windows on Arm. To fix, we check
and (possibly redefine) alloca on all Windows targets.

Bug: 1020541, 893460
Change-Id: Ife80ce3e7478d39d36e67686d70a74ff2319c714
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1892976Reviewed-by: default avatarNate Chapin <japhet@chromium.org>
Reviewed-by: default avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Richard Townsend <richard.townsend@arm.com>
Cr-Commit-Position: refs/heads/master@{#712506}
parent 9b7a6f5f
...@@ -34,6 +34,16 @@ ...@@ -34,6 +34,16 @@
#include "third_party/blink/renderer/platform/wtf/assertions.h" #include "third_party/blink/renderer/platform/wtf/assertions.h"
#include "v8/include/v8.h" #include "v8/include/v8.h"
#if defined(OS_WIN)
#if !defined(alloca)
// Windows uses _alloca instead of alloca, but only #define's alloca to _alloca
// in malloc.h if _CRT_INTERNAL_NONSTDC_NAMES is defined. If that doesn't happen
// (e.g. on Windows on Arm), fix up the definition.
#include <malloc.h>
#define alloca _alloca
#endif
#endif
namespace blink { namespace blink {
// type is an instance of class template V8StringResource<>, // type is an instance of class template V8StringResource<>,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment