WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
83390
Web Inspector: CodeGeneratorInspector.py: do not expose raw methods from generated types
https://bugs.webkit.org/show_bug.cgi?id=83390
Summary
Web Inspector: CodeGeneratorInspector.py: do not expose raw methods from gene...
Peter Rybin
Reported
2012-04-06 13:56:08 PDT
Generated types in InspectorTypeBuilder are public inherited from InspectorObject and InspectorArray. This opens all raw methods to any client. The generated types should be inherited from intermediate types instead (private inheritance cannot be used because RefPtf won't work with it).
Attachments
Patch
(41.81 KB, patch)
2012-04-06 15:38 PDT
,
Peter Rybin
no flags
Details
Formatted Diff
Diff
Patch
(41.90 KB, patch)
2012-04-09 09:26 PDT
,
Peter Rybin
no flags
Details
Formatted Diff
Diff
Patch
(41.90 KB, patch)
2012-04-10 09:21 PDT
,
Peter Rybin
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Peter Rybin
Comment 1
2012-04-06 15:38:07 PDT
Created
attachment 136075
[details]
Patch
WebKit Review Bot
Comment 2
2012-04-06 16:26:13 PDT
Attachment 136075
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/inspector/InspectorValues.cpp:668: The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] Source/WebCore/inspector/InspectorValues.cpp:763: The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] Total errors found: 2 in 12 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yury Semikhatsky
Comment 3
2012-04-09 05:34:20 PDT
Comment on
attachment 136075
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=136075&action=review
> Source/WebCore/ChangeLog:9 > + protected. InspectorObject and InspectorArray are reimplemented by "public Morozov" pattern.
This pattern doesn't seem to be used outside of post-Soviet countries, could you rephrase it?
> Source/WebCore/inspector/InspectorValues.cpp:671 > + *output = reinterpret_cast<InspectorObject*>(this);
Why not static_cast as in other places?
> Source/WebCore/inspector/InspectorValues.cpp:683 > + return reinterpret_cast<InspectorObject*>(this);
Same here and below.
Peter Rybin
Comment 4
2012-04-09 09:26:43 PDT
Created
attachment 136237
[details]
Patch
Peter Rybin
Comment 5
2012-04-09 09:27:34 PDT
> > Source/WebCore/ChangeLog:9 > > + protected. InspectorObject and InspectorArray are reimplemented by "public Morozov" pattern. > > This pattern doesn't seem to be used outside of post-Soviet countries, could you rephrase it?
Done
> > Source/WebCore/inspector/InspectorValues.cpp:671 > > + *output = reinterpret_cast<InspectorObject*>(this); > Why not static_cast as in other places?
Done
> > Source/WebCore/inspector/InspectorValues.cpp:683 > > + return reinterpret_cast<InspectorObject*>(this); > Same here and below.
Done
WebKit Review Bot
Comment 6
2012-04-09 09:33:18 PDT
Attachment 136237
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/inspector/InspectorValues.cpp:668: The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] Source/WebCore/inspector/InspectorValues.cpp:763: The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] Total errors found: 2 in 12 files If any of these errors are false positives, please file a bug against check-webkit-style.
Peter Rybin
Comment 7
2012-04-10 09:21:05 PDT
Created
attachment 136468
[details]
Patch
WebKit Review Bot
Comment 8
2012-04-10 09:23:15 PDT
Attachment 136468
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/inspector/InspectorValues.cpp:668: The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] Source/WebCore/inspector/InspectorValues.cpp:763: The parameter type should use PassRefPtr instead of RefPtr. [readability/pass_ptr] [5] Total errors found: 2 in 12 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Review Bot
Comment 9
2012-04-10 15:39:56 PDT
Comment on
attachment 136468
[details]
Patch Clearing flags on attachment: 136468 Committed
r113783
: <
http://trac.webkit.org/changeset/113783
>
WebKit Review Bot
Comment 10
2012-04-10 15:40:03 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug