Open
Bug 1272554
Opened 9 years ago
Updated 2 years ago
Add lambda versions of nsIDocument::EnumerateSubDocuments
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
NEW
People
(Reporter: seth, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
1.85 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
It'd be extremely natural for nsIDocument::EnumerateSubDocuments() to take a lambda function, so let's add a version that does so. (Given that EnumerateSubDocuments() is virtual and the lambda version should be a template, we actually need to add a different method that calls the original.)
While we're at it, it's a common need to apply the same function to both a document and all of its subdocuments. This is especially convenient when using lambdas. Let's add another variant of EnumerateSubDocuments() for that purpose, too.
Reporter | ||
Comment 1•9 years ago
|
||
Here's the patch. The new methods use a local captureless lambda to create a
normal function pointer which can be passed to EnumerateSubDocuments(), so the
original implementation is used under the hood.
Attachment #8752037 -
Flags: review?(mrbkap)
Reporter | ||
Comment 2•9 years ago
|
||
Argh, noticed a comment typo immediately after uploading.
Attachment #8752039 -
Flags: review?(mrbkap)
Reporter | ||
Updated•9 years ago
|
Attachment #8752037 -
Attachment is obsolete: true
Attachment #8752037 -
Flags: review?(mrbkap)
Comment 3•9 years ago
|
||
Comment on attachment 8752039 [details] [diff] [review]
Add lambda versions of nsIDocument::EnumerateSubDocuments().
Review of attachment 8752039 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/base/nsIDocument.h
@@ +1553,5 @@
> */
> typedef bool (*nsSubDocEnumFunc)(nsIDocument *aDocument, void *aData);
> virtual void EnumerateSubDocuments(nsSubDocEnumFunc aCallback,
> void *aData) = 0;
> + /**
Nit: add a blank line before the beginning of this comment.
Attachment #8752039 -
Flags: review?(mrbkap) → review+
Comment 4•3 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months, so the assignee is being reset.
Assignee: seth.bugzilla → nobody
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•