Bug 6277 - Patch: additional API for checking whether object has property map entries
Summary: Patch: additional API for checking whether object has property map entries
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 420+
Hardware: Other Linux
: P2 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-28 14:23 PST by Maks Orlovich
Modified: 2010-06-11 16:35 PDT (History)
1 user (show)

See Also:


Attachments
patch (1.34 KB, patch)
2005-12-28 14:23 PST, Maks Orlovich
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maks Orlovich 2005-12-28 14:23:04 PST
(We need this in KHTML to avoid retaining quite so many wrappers). 
 
The attached diff adds a couple of calls to check whether the object has 
something in its property map. Suggestion for better method names are more 
than welcome.
Comment 1 Maks Orlovich 2005-12-28 14:23:30 PST
Created attachment 5344 [details]
patch
Comment 2 Geoffrey Garen 2005-12-28 14:35:07 PST
I don't think an API name should refer to internal implementation such as a "PropertyMap."

How about hasProperties() or hasAnyProperties()?

Or is this API designed specifically to glean information about the property map?
Comment 3 Maks Orlovich 2005-12-28 15:12:31 PST
Well, it excludes dynamic properties, so hasProperties isn't entirely 
accurate.... The point is that you don't strictly  
have to retain DOM wrapper objects around unless they have some JS properties  
set. (Recreating them can be slower in the `normal' case but it avoids some  
really bad cases)  
 
Comment 4 Maks Orlovich 2006-01-19 14:57:06 PST
Hmm, actually, I just noticed that _prop is protected, so all I need is the 
PropertyMap::isEmpty accessor. 
 
Comment 5 Eric Seidel (no email) 2007-10-01 14:49:57 PDT
Is this still an issue?  This bug hasn't been touched in over a year.  I would assume this can be closed.
Comment 6 Alexey Proskuryakov 2010-06-11 16:35:24 PDT
Seems so.