[Webkit-unassigned] [Bug 20422] Patch to allow custom memory allocation control

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 9 01:14:01 PDT 2008


https://bugs.webkit.org/show_bug.cgi?id=20422





------- Comment #27 from Kelemen.Balazs.3 at stud.u-szeged.hu  2008-10-09 01:14 PDT -------
(In reply to comment #25)
> (From update of attachment 24113 [edit])
> This patch depends on Paul Pedriana's New.h, and if you read the bug report
> you'll see many unaddressed comments from me about that. So we can't just land
> that file until the comments are addressed. I'm not going to repeat my
> comments.

Ok, wee stop this work until AllocBase is finished.

> This patch contains a double-copy of New.h; the whole file pasted twice.
Sorry, it was a silly mistake.

> 
> -    class ExpressionNode : public Node {
> +    class ExpressionNode : public Node, public WTF::AllocBase {
> 
> Where is the code that does "new ExpressionNode"?

There is no new call to ExpressionNode directly but its descendants are
instantiated by new. Here is the list of descendants which are instantiated:
JavaScriptCore/kjs/nodes.cpp: line 1303 - AssignResolveNode : public
                            ExpressionNode, public ThrowableExpressionData
JavaScriptCore/kjs/grammar.y: line 1249 - ReadModifyBracketNode : public
                            ExpressionNode, public ThrowableSubExpressionData
JavaScriptCore/kjs/grammar.y: line 1259 - ReadModifyDotNode : public
                            ExpressionNode, public ThrowableSubExpressionData
JavaScriptCore/kjs/grammar.y: line 1275 - PrefixBracketNode : public 
                     ExpressionNode, public ThrowablePrefixedSubExpressionData
JavaScriptCore/kjs/grammar.y: line 1281 - PrefixDotNode : public
                     ExpressionNode, public ThrowablePrefixedSubExpressionData
JavaScriptCore/kjs/grammar.y: line 1297 - PostfixBracketNode : public
                     ExpressionNode, public ThrowableSubExpressionData
JavaScriptCore/kjs/grammar.y: line 1304 - PostfixDotNode : public
                     ExpressionNode, public ThrowableSubExpressionData
JavaScriptCore/kjs/grammar.y: line 1324 - FunctionCallBracketNode : public
                     ExpressionNode, public ThrowableSubExpressionData
JavaScriptCore/kjs/grammar.y: line 1330 - FunctionCallDotNode : public 
                     ExpressionNode, public ThrowableSubExpressionData


> +#include <wtf/New.h>
> 
> Why are you adding this include to ustring.h?
Another mistake.

> -    class Vector {
> +    class Vector : public AllocBase {
> 
> Where is the code that does "new Vector"?

JavaScriptCore/VM/SegmentedVector.h: line 149 - "Segment* segment = new
Segment;"
And as you can see Segment is a Vector: "typedef Vector<T, SegmentSize>
Segment;"

> 
> -class MainThreadInvoker : public QObject {
> +class MainThreadInvoker : public QObject, public AllocBase {
> 
> Where is the code that does "new MainThreadInvoker"?
> 
JavaScriptCore/wtf/qt/MainThreadQt.cpp: line 59 -
Q_GLOBAL_STATIC(MainThreadInvoker, webkit_main_thread_invoker)
I think this line call new, but I am not sure. We will analyse it.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list