WebKit Bugzilla
Attachment 360618 Details for
Bug 194046
: testapi's `testBytecodeCache` does not need to run the code twice
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194046-20190130140029.patch (text/plain), 2.80 KB, created by
Tadeu Zagallo
on 2019-01-30 14:00:49 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Tadeu Zagallo
Created:
2019-01-30 14:00:49 PST
Size:
2.80 KB
patch
obsolete
>Subversion Revision: 240718 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 4c2d28bb7dc60281d9c1f45807de1efcc627fcf4..504a57fb940655f53d501b0faa9923573207aee0 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,16 @@ >+2019-01-30 Tadeu Zagallo <tzagallo@apple.com> >+ >+ testapi's `testBytecodeCache` does not need to run the code twice >+ https://bugs.webkit.org/show_bug.cgi?id=194046 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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 Yusuke Suzuki <yusukesuzuki@slowstart.org> > > [JSC] Make global static variables "const" as much as possible >diff --git a/Source/JavaScriptCore/API/tests/testapi.mm b/Source/JavaScriptCore/API/tests/testapi.mm >index 2289e6e3489ae2f6cdcebf56562a3113d696855b..834913161bce57daf23cd882747dc49ad3261c2a 100644 >--- a/Source/JavaScriptCore/API/tests/testapi.mm >+++ b/Source/JavaScriptCore/API/tests/testapi.mm >@@ -2001,9 +2001,7 @@ static void testBytecodeCache() > [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,15 +2013,7 @@ static void testBytecodeCache() > }; > > @autoreleasepool { >- 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; >+ 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]];
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194046
:
360618
|
360645
|
360661