mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 19:25:43 +00:00
Bug 1452441 - Fix infinite recursion in testBinASTReader for Windows;r=Yoric
MozReview-Commit-ID: Fwv0VgPpv4v --HG-- extra : rebase_source : e2dae7776ade6274cfc37b8fb9be99f2331110b9
This commit is contained in:
parent
1a33352c38
commit
b7121e1a4d
@ -144,7 +144,7 @@ if CONFIG['NIGHTLY_BUILD']:
|
||||
'testErrorInterceptor.cpp',
|
||||
]
|
||||
|
||||
if CONFIG['JS_BUILD_BINAST'] and CONFIG['JS_STANDALONE'] and CONFIG['OS_TARGET'] != 'WINNT':
|
||||
if CONFIG['JS_BUILD_BINAST'] and CONFIG['JS_STANDALONE']:
|
||||
# Standalone builds leave the source directory untouched,
|
||||
# which lets us run tests with the data files intact.
|
||||
# Otherwise, in the current state of the build system,
|
||||
|
@ -81,11 +81,17 @@ runTestFromPath(JSContext* cx, const char* path)
|
||||
#elif defined(XP_WIN)
|
||||
MOZ_ASSERT(path[pathlen - 1] == '\\');
|
||||
|
||||
const char PATTERN[] = "*";
|
||||
Vector<char> pattern(cx);
|
||||
if (!pattern.append(path, pathlen))
|
||||
MOZ_CRASH();
|
||||
if (!pattern.append('*'))
|
||||
MOZ_CRASH();
|
||||
if (!pattern.append('\0'))
|
||||
MOZ_CRASH();
|
||||
|
||||
WIN32_FIND_DATA FindFileData;
|
||||
enterJsDirectory();
|
||||
HANDLE hFind = FindFirstFile(PATTERN, &FindFileData);
|
||||
HANDLE hFind = FindFirstFile(pattern.begin(), &FindFileData);
|
||||
exitJsDirectory();
|
||||
for (bool found = (hFind != INVALID_HANDLE_VALUE);
|
||||
found;
|
||||
|
Loading…
Reference in New Issue
Block a user