Closed Bug 575399 Opened 14 years ago Closed 14 years ago

IndexedDB: Remove XPConnect slow paths from some IndexedDB methods

Categories

(Core :: Storage: IndexedDB, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bent.mozilla, Assigned: bent.mozilla)

References

Details

Attachments

(1 file)

Attached patch Patch, v1Splinter Review
Requires patch in bug 574872.
Attachment #454635 - Flags: review?(sdwilsh)
Comment on attachment 454635 [details] [diff] [review]
Patch, v1

For comments with context, please see http://reviews.visophyte.org/r/454635/.

on file: dom/indexedDB/IDBEvents.cpp line 345
> NS_IMETHODIMP
> IDBSuccessEvent::GetResult(JSContext* aCx,
>                            jsval* aResult)
> {
>   if (!mResult) {
>     *aResult = JSVAL_VOID;
>     return NS_OK;
>   }
> 
>   nsIXPConnect* xpc = nsContentUtils::XPConnect();
>   NS_ENSURE_STATE(xpc);
> 
>   JSAutoRequest ar(aCx);
>   JSObject* scope = JS_GetGlobalObject(aCx);
>   NS_ENSURE_STATE(scope);
> 
>   nsresult rv = xpc->VariantToJS(aCx, scope, mResult, aResult);
>   NS_ENSURE_SUCCESS(rv, rv);
> 
>   return NS_OK;
> }

Hmmm, why are we still using a variant for this.  Isn't that slower?


on file: dom/indexedDB/nsIIDBCursor.idl line 45
> %{C++
> #include "jsapi.h"
> %}

Is this needed for the context?  If so, could we not just forward declare it?


r=sdwilsh
Attachment #454635 - Flags: review?(sdwilsh) → review+
(In reply to comment #1)
> Hmmm, why are we still using a variant for this.  Isn't that slower?

Removing nsIVariant is another task on my list, not attempted here.

> Is this needed for the context?  If so, could we not just forward declare it?

And for the jsval. Since jsval is special (not a class, not passed by address) we can't just forward declare.
http://hg.mozilla.org/mozilla-central/rev/6346fc0d0d61
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Blocks: IndexedDB
Target Milestone: --- → mozilla1.9.3b1
Component: DOM → DOM: IndexedDB
Target Milestone: mozilla2.0b1 → ---
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: