Closed Bug 887524 Opened 6 years ago Closed 6 years ago

Move IDBRequest to WebIDL

Categories

(Core :: DOM: IndexedDB, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: Ehsan, Assigned: baku)

References

(Blocks 1 open bug)

Details

(Keywords: addon-compat, dev-doc-complete, site-compat)

Attachments

(1 file, 1 obsolete file)

No description provided.
Assignee: ehsan → amarchesini
Attached patch request.patch (obsolete) — Splinter Review
Attachment #783691 - Flags: review?(Jan.Varga)
Comment on attachment 783691 [details] [diff] [review]
request.patch

Review of attachment 783691 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/indexedDB/IDBRequest.cpp
@@ +24,5 @@
>  #include "IDBEvents.h"
>  #include "IDBFactory.h"
>  #include "IDBTransaction.h"
>  
> +#include "mozilla/dom/IDBOpenDBRequestBinding.h"

Nit: this should go before |#include "nsComponentManagerUtils.h"|

::: dom/indexedDB/IDBRequest.h
@@ +6,5 @@
>  
>  #ifndef mozilla_dom_indexeddb_idbrequest_h__
>  #define mozilla_dom_indexeddb_idbrequest_h__
>  
> +

Nit: remove this empty line

@@ +19,1 @@
>  #include "mozilla/dom/DOMError.h"

#include "mozilla/dom/indexedDB/IndexedDatabase.h"

#include "mozilla/Attributes.h"
#include "mozilla/dom/DOMError.h"
#include "mozilla/dom/IDBRequestBinding.h"
#include "mozilla/ErrorResult.h"
#include "nsCycleCollectionParticipant.h"
#include "nsWrapperCache.h"

#include "mozilla/dom/indexedDB/IDBWrapperCache.h"

@@ +116,5 @@
> +  GetResult(JSContext* aCx, ErrorResult& aRv) const;
> +
> +  nsISupports*
> +  GetSource() const
> +  {

add the main thread assertion, here and below

::: dom/indexedDB/ipc/IndexedDBParent.cpp
@@ +383,5 @@
>  
>    AutoSafeJSContext cx;
>  
> +  ErrorResult error;
> +  JS::Value result = mOpenRequest->GetResult(cx, error);

Is this safe ?

I would expect something like:
JS::Rooted<JS::Value> result ...
Attachment #783691 - Flags: review?(Jan.Varga)
Attached patch request.patchSplinter Review
Attachment #783691 - Attachment is obsolete: true
Attachment #783798 - Flags: review?(Jan.Varga)
Comment on attachment 783798 [details] [diff] [review]
request.patch

r=me
Attachment #783798 - Flags: review?(Jan.Varga) → review+
Duplicate of this bug: 888599
IDBRequest.LOADING and IDBRequest.DONE are gone. Documentation must be updated.
https://hg.mozilla.org/mozilla-central/rev/023d2f835ca0
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.