Title: [240820] trunk/Source/_javascript_Core
Revision
240820
Author
tzaga...@apple.com
Date
2019-01-31 14:19:52 -0800 (Thu, 31 Jan 2019)

Log Message

testapi fails RELEASE_ASSERT(codeBlock) in fetchFromDisk() of CodeCache.h
https://bugs.webkit.org/show_bug.cgi?id=194112

Reviewed by Mark Lam.

`testBytecodeCache` does not populate the bytecode cache for the global
CodeBlock, so it should only enable `forceDiskCache` after its execution.

* API/tests/testapi.mm:
(testBytecodeCache):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/API/tests/testapi.mm (240819 => 240820)


--- trunk/Source/_javascript_Core/API/tests/testapi.mm	2019-01-31 22:17:49 UTC (rev 240819)
+++ trunk/Source/_javascript_Core/API/tests/testapi.mm	2019-01-31 22:19:52 UTC (rev 240820)
@@ -2002,6 +2002,7 @@
         [bazSource writeToURL:bazPath atomically:NO encoding:NSASCIIStringEncoding error:nil];
 
         auto block = ^(JSContext *context, JSValue *identifier, JSValue *resolve, JSValue *reject) {
+            JSC::Options::forceDiskCache() = true;
             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"])
@@ -2013,7 +2014,6 @@
         };
 
         @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]];

Modified: trunk/Source/_javascript_Core/ChangeLog (240819 => 240820)


--- trunk/Source/_javascript_Core/ChangeLog	2019-01-31 22:17:49 UTC (rev 240819)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-01-31 22:19:52 UTC (rev 240820)
@@ -1,3 +1,16 @@
+2019-01-31  Tadeu Zagallo  <tzaga...@apple.com>
+
+        testapi fails RELEASE_ASSERT(codeBlock) in fetchFromDisk() of CodeCache.h
+        https://bugs.webkit.org/show_bug.cgi?id=194112
+
+        Reviewed by Mark Lam.
+
+        `testBytecodeCache` does not populate the bytecode cache for the global
+        CodeBlock, so it should only enable `forceDiskCache` after its execution.
+
+        * API/tests/testapi.mm:
+        (testBytecodeCache):
+
 2019-01-31  Yusuke Suzuki  <ysuz...@apple.com>
 
         Unreviewed, follow-up after r240796
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to