RESOLVED FIXED198482
JSScript should not keep bytecode cache in memory
https://bugs.webkit.org/show_bug.cgi?id=198482
Summary JSScript should not keep bytecode cache in memory
Tadeu Zagallo
Reported 2019-06-03 05:31:55 PDT
...
Attachments
Patch (31.12 KB, patch)
2019-06-03 05:41 PDT, Tadeu Zagallo
no flags
Patch (31.11 KB, patch)
2019-06-03 07:06 PDT, Tadeu Zagallo
no flags
Patch for landing (32.57 KB, patch)
2019-06-04 03:28 PDT, Tadeu Zagallo
no flags
Tadeu Zagallo
Comment 1 2019-06-03 05:41:06 PDT
Tadeu Zagallo
Comment 2 2019-06-03 07:06:04 PDT
Created attachment 371189 [details] Patch Fix windows build
Saam Barati
Comment 3 2019-06-03 13:40:54 PDT
Comment on attachment 371189 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=371189&action=review r=me > Source/JavaScriptCore/runtime/CachedTypes.cpp:176 > + Ref<CachedBytecode> releaseMapped(BytecodeCacheError& error) Kinda weird this returns ref instead of ptr. Why not RefPtr and make nullptr mean there was an error? I feel like it's weird to construct an empty CachedBytecode here. > Source/JavaScriptCore/runtime/CachedTypes.cpp:180 > + error.standardError(errno); nit: This style feels kinda weird. Why not just make error something you assign to? And by default it's empty? And you can make this a static function that is a factory constructor. I feel like that's more in line with the style of error handling I've seen elsewhere in WK. So something like: ``` error = BytecodeCacheError::standardError(errno) return nullptr ``` > Source/JavaScriptCore/runtime/CachedTypes.cpp:2411 > + Encoder encoder(vm, -1); You could also make -1 the default argument of this function.
Tadeu Zagallo
Comment 4 2019-06-04 03:28:39 PDT
Created attachment 371264 [details] Patch for landing
WebKit Commit Bot
Comment 5 2019-06-04 04:14:16 PDT
Comment on attachment 371264 [details] Patch for landing Clearing flags on attachment: 371264 Committed r246060: <https://trac.webkit.org/changeset/246060>
WebKit Commit Bot
Comment 6 2019-06-04 04:14:18 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7 2019-06-04 04:15:21 PDT
Note You need to log in before you can comment on or make changes to this bug.