WebKit Bugzilla
Attachment 361908 Details for
Bug 194536
: SourceCode should be copied when generating bytecode for functions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-194536-20190213122614.patch (text/plain), 2.01 KB, created by
Tadeu Zagallo
on 2019-02-13 03:26:46 PST
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Tadeu Zagallo
Created:
2019-02-13 03:26:46 PST
Size:
2.01 KB
patch
obsolete
>Subversion Revision: 241291 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 608249f7f276994737bd7817a105f0853a0dde39..0b2166dea688a5c0557d08cef19ec703a29bcb1e 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,17 @@ >+2019-02-12 Tadeu Zagallo <tzagallo@apple.com> >+ >+ SourceCode should be copied when generating bytecode for functions >+ https://bugs.webkit.org/show_bug.cgi?id=194536 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The FunctionExecutable might be collected while generating the bytecode >+ for nested functions, in which case the SourceCode reference would no >+ longer be valid. >+ >+ * runtime/CodeCache.cpp: >+ (JSC::generateUnlinkedCodeBlockForFunctions): >+ > 2019-02-11 Mark Lam <mark.lam@apple.com> > > Randomize insertion of deallocated StructureIDs into the StructureIDTable's free list. >diff --git a/Source/JavaScriptCore/runtime/CodeCache.cpp b/Source/JavaScriptCore/runtime/CodeCache.cpp >index b41e52651f3e7c9f6ecde23ffb9699c89db78657..9b6070be93f985a4f2b4f3e0db1355da7a11a3f8 100644 >--- a/Source/JavaScriptCore/runtime/CodeCache.cpp >+++ b/Source/JavaScriptCore/runtime/CodeCache.cpp >@@ -170,7 +170,9 @@ void generateUnlinkedCodeBlockForFunctions(VM& vm, UnlinkedCodeBlock* unlinkedCo > return; > > FunctionExecutable* executable = unlinkedExecutable->link(vm, parentSource); >- const SourceCode& source = executable->source(); >+ // FIXME: We shouldn't need to create a FunctionExecutable just to get its source code >+ // https://bugs.webkit.org/show_bug.cgi?id=194576 >+ SourceCode source = executable->source(); > UnlinkedFunctionCodeBlock* unlinkedFunctionCodeBlock = unlinkedExecutable->unlinkedCodeBlockFor(vm, source, constructorKind, debuggerMode, error, unlinkedExecutable->parseMode()); > if (unlinkedFunctionCodeBlock) > generateUnlinkedCodeBlockForFunctions(vm, unlinkedFunctionCodeBlock, source, debuggerMode, error);
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 194536
:
361793
|
361908
|
361909