WebKit Bugzilla
Attachment 361886 Details for
Bug 194577
: JSScript needs to retain its cache path NSURL*
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for landing
a-backup.diff (text/plain), 1.87 KB, created by
Saam Barati
on 2019-02-12 18:17:44 PST
(
hide
)
Description:
patch for landing
Filename:
MIME Type:
Creator:
Saam Barati
Created:
2019-02-12 18:17:44 PST
Size:
1.87 KB
patch
obsolete
>Index: Source/JavaScriptCore/ChangeLog >=================================================================== >--- Source/JavaScriptCore/ChangeLog (revision 241334) >+++ Source/JavaScriptCore/ChangeLog (working copy) >@@ -1,3 +1,14 @@ >+2019-02-12 Saam barati <sbarati@apple.com> >+ >+ JSScript needs to retain its cache path NSURL* >+ https://bugs.webkit.org/show_bug.cgi?id=194577 >+ >+ Reviewed by Tim Horton. >+ >+ * API/JSScript.mm: >+ (+[JSScript scriptFromASCIIFile:inVirtualMachine:withCodeSigning:andBytecodeCache:]): >+ (-[JSScript dealloc]): >+ > 2019-02-12 Michael Catanzaro <mcatanzaro@igalia.com> > > Unreviewed, fix -Wimplicit-fallthrough warning after r241140 >Index: Source/JavaScriptCore/API/JSScript.mm >=================================================================== >--- Source/JavaScriptCore/API/JSScript.mm (revision 241334) >+++ Source/JavaScriptCore/API/JSScript.mm (working copy) >@@ -42,7 +42,7 @@ > @implementation JSScript { > __weak JSVirtualMachine* m_virtualMachine; > String m_source; >- NSURL* m_cachePath; >+ RetainPtr<NSURL> m_cachePath; > JSC::CachedBytecode m_cachedBytecode; > JSC::Strong<JSC::JSSourceCode> m_jsSourceCode; > UniquedStringImpl* m_moduleKey; >@@ -128,7 +128,7 @@ - (void)readCache > if (!m_cachePath) > return; > >- int fd = open(m_cachePath.path.UTF8String, O_RDONLY); >+ int fd = open([m_cachePath path].UTF8String, O_RDONLY); > if (fd == -1) > return; > >@@ -161,7 +161,7 @@ - (void)writeCache > m_cachedBytecode = JSC::generateModuleBytecode(m_virtualMachine.vm, m_jsSourceCode->sourceCode(), error); > if (error.isValid()) > return; >- int fd = open(m_cachePath.path.UTF8String, O_CREAT | O_WRONLY, 0666); >+ int fd = open([m_cachePath path].UTF8String, O_CREAT | O_WRONLY, 0666); > if (fd == -1) > return; > int rc = flock(fd, LOCK_EX | LOCK_NB);
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 194577
:
361882
|
361884
|
361885
| 361886