Title: [240753] trunk/Source/_javascript_Core
- Revision
- 240753
- Author
- [email protected]
- Date
- 2019-01-30 19:07:56 -0800 (Wed, 30 Jan 2019)
Log Message
testapi's `testBytecodeCache` does not need to run the code twice
https://bugs.webkit.org/show_bug.cgi?id=194046
Reviewed by Mark Lam.
Since we populate the cache eagerly (unlike the stress tests) we don't
need to run the code twice.
* API/tests/testapi.mm:
(testBytecodeCache):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/API/tests/testapi.mm (240752 => 240753)
--- trunk/Source/_javascript_Core/API/tests/testapi.mm 2019-01-31 02:49:36 UTC (rev 240752)
+++ trunk/Source/_javascript_Core/API/tests/testapi.mm 2019-01-31 03:07:56 UTC (rev 240753)
@@ -2001,9 +2001,7 @@
[barSource writeToURL:barPath atomically:NO encoding:NSASCIIStringEncoding error:nil];
[bazSource writeToURL:bazPath atomically:NO encoding:NSASCIIStringEncoding error:nil];
- __block bool forceDiskCache = false;
auto block = ^(JSContext *context, JSValue *identifier, JSValue *resolve, JSValue *reject) {
- JSC::Options::forceDiskCache() = forceDiskCache;
if ([identifier isEqualToObject:@"file:///directory/bar.js"])
[resolve callWithArguments:@[[JSScript scriptFromASCIIFile:fooPath inVirtualMachine:context.virtualMachine withCodeSigning:nil andBytecodeCache:fooCachePath]]];
else if ([identifier isEqualToObject:@"file:///foo.js"])
@@ -2015,20 +2013,12 @@
};
@autoreleasepool {
+ JSC::Options::forceDiskCache() = true;
auto *context = [JSContextFetchDelegate contextWithBlockForFetch:block];
context.moduleLoaderDelegate = context;
JSValue *promise = [context evaluateScript:@"import('../otherDirectory/baz.js');" withSourceURL:[NSURL fileURLWithPath:@"/directory" isDirectory:YES]];
JSValue *null = [JSValue valueWithNullInContext:context];
checkModuleCodeRan(context, promise, null);
- }
-
- @autoreleasepool {
- forceDiskCache = true;
- auto *context = [JSContextFetchDelegate contextWithBlockForFetch:block];
- context.moduleLoaderDelegate = context;
- JSValue *promise = [context evaluateScript:@"import('../otherDirectory/baz.js');" withSourceURL:[NSURL fileURLWithPath:@"/directory" isDirectory:YES]];
- JSValue *null = [JSValue valueWithNullInContext:context];
- checkModuleCodeRan(context, promise, null);
JSC::Options::forceDiskCache() = false;
}
Modified: trunk/Source/_javascript_Core/ChangeLog (240752 => 240753)
--- trunk/Source/_javascript_Core/ChangeLog 2019-01-31 02:49:36 UTC (rev 240752)
+++ trunk/Source/_javascript_Core/ChangeLog 2019-01-31 03:07:56 UTC (rev 240753)
@@ -1,3 +1,16 @@
+2019-01-30 Tadeu Zagallo <[email protected]>
+
+ testapi's `testBytecodeCache` does not need to run the code twice
+ https://bugs.webkit.org/show_bug.cgi?id=194046
+
+ Reviewed by Mark Lam.
+
+ Since we populate the cache eagerly (unlike the stress tests) we don't
+ need to run the code twice.
+
+ * API/tests/testapi.mm:
+ (testBytecodeCache):
+
2019-01-30 Saam barati <[email protected]>
[WebAssembly] Change BBQ to generate Air IR
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes