Commit Graph
24 Commits
Author SHA1 Message Date
Sylvestre Ledru e5a134f73a Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset
2018-11-30 11:46:48 +01:00
Nathan Froyd 1fc1d9b4d3 Bug 1393885 - provide a faster path for do_GetWeakReference; r=erahm
NS_GetWeakReference, called from do_GetWeakReference, QI's its argument
to nsISupportsWeakReference to determine whether a weak reference can be
obtained.  If NS_GetWeakReference is already receiving a
nsISupportsWeakReference pointer, or something than can be converted to
one, then we can skip the QI for a small performance win.
2017-09-05 15:39:40 -04:00
Nathan Froyd acbe7a8f56 Bug 1393592 - manually de-virtualize nsIWeakReference::QueryReferent; r=ehsan
The virtual call to this method shows up in profiles, and therefore
would be nice to avoid if possible.  We can do that by making
nsIWeakReference hold the weak reference itself and therefore
implementing a non-virtual QueryReferent method.
2017-08-25 13:48:29 -04:00
Masayuki Nakano 7969a22ae3 Bug 1372829 - part2: mozilla::EditorBase should cache raw pointer of nsISelectionController and nsIDocument with nsWeakPtr r=froydnj,m_kato
mozilla::EditorBase stores nsISelectionController and nsIDocument with nsWeakPtr.  However, nsWeakPtr requires QI to retrieve actual pointer and it makes some damage to the performance.  If mozilla::WeakPter were available for them, it'd be great.  However, it's not available with nsISelectionController nor nsIDocument because it's possible to implement SupportsWeakPtr only with their subclasses but the subclasses shouldn't be referred by editor.  Therefore, this patch creates mozilla::CachedWeakPtr<class T> which stores both raw pointer (as cache) and nsWeakPtr and when its cache is requested, it checks if the object referred by nsWeakPtr is still alive.

Additionally, this patch hides the members from subclasses of EditorBase for reducing the maintenance cost.

MozReview-Commit-ID: FvtM7453Vv8
2017-06-20 00:55:00 +09:00
Nathan Froyd bd856966a6 Bug 1359415 - move threadsafety checks inside nsAutoOwningThread; r=erahm
This change moves most of the logic for the threadsafety check into
nsAutoOwningThread, rather than having part of the logic live in
nsAutoOwningThread and part of the logic live in nsDebug.h.  Changing
this also forces us to clean up a couple of places that replicated the
logic that lived in nsDebug.h as well.
2017-04-26 11:41:32 -04:00
Benjamin Smedberg d1c8ee1d1b Bug 1332631 part B - file moves from xpcom/glue to xpcom/base, r=froydnj
MozReview-Commit-ID: ARS1aTugYjl
2017-01-23 09:24:01 -05:00
[email protected] 085f4dbfb7 These files have been moved into xpcom/glue
Bug #120474 r=dougt
2002-02-08 07:22:47 +00:00
[email protected] 74848c768e Bugzilla Bug 110080 change !NS_SUCCEEDED(status) to NS_FAILED(status)
s/!NS_SUCCEEDED/NS_FAILED/g;s/!NS_FAILED/NS_SUCCEEDED/g;
r=dougt sr=hewitt
2001-11-19 06:45:00 +00:00
[email protected] 51c37a0da1 backing out changes to 104172. [email protected] 2001-10-23 03:50:24 +00:00
[email protected] 2605bce49e Extraneous Symbol Removal. Patch by Jon Smirl [email protected]. [email protected], [email protected]. Bug 104172 , 104316 , 104420 , 104426 , 104461 , 104511 , 104527 2001-10-23 01:37:21 +00:00
[email protected] 1e86389039 fix bustage 2001-03-09 01:38:36 +00:00
[email protected] 3dfa2859fe bug #68872: r=jag, sr=waterson. provide |do_GetWeakReference|. 2001-03-09 00:40:11 +00:00
[email protected] 8e9ca8a01b fix wrong error return; bug #57981 r=waterson, sr=brendan 2000-10-27 21:46:20 +00:00
[email protected] 6fb4a9e682 NS_GET_IID(). Thanks to patch from [email protected] [email protected] 1999-11-30 23:36:32 +00:00
[email protected] 2cfc96d940 don't ASSERT that it doesn't support weak references for NULL. r=pinkerton 1999-11-23 03:10:02 +00:00
[email protected] 84ed122428 clear out result in |do_QueryReferent| on error; assert in |NS_GetWeakReference| if the source object doesn't support weak references; also return NS_ERROR_NO_INTERFACE in release builds. r=pinkerton 1999-11-22 22:59:21 +00:00
[email protected] 68eaf65ae1 changed the mechanism underlying |do_QueryInterface| to decouple |nsCOMPtr| from services, |nsIWeakReference|, etc. This change fixes bug #17364, and paves the way for making |nsCOMPtr| cooperate with services. r=valeski (additional builds done by dmose and syd) 1999-10-31 00:35:48 +00:00
[email protected] 6f62a47cac got rid of |NS_IMPL_ISUPPORTS|, where possible, in favor of |NS_IMPL_ISUPPORTS0| or ...1 according to the specific use; got rid of |NS_DEFINE_IID| where possible, or where it should have been |NS_DEFINE_CID|; fixed bad implementations of |QueryInterface|, where possible. Built, tested apprunner, reviewed the changes with hyatt (since he was around to look) before checking in 1999-08-23 10:14:16 +00:00
[email protected] 240c0b38db added license, fixed tabs 1999-08-21 20:07:27 +00:00
[email protected] 9516b932ca renamed to QueryReferent, do_QueryReferent, etc. 1999-08-13 23:00:58 +00:00
[email protected] 8bf5f77d44 fix WeakReference exporting for Windows. a:chofmann r:scc. 1999-08-11 23:48:08 +00:00
[email protected] 50e653b5ee well, now it needs to include nsCOMPtr, since the header doesn't anymore 1999-08-03 08:34:17 +00:00
[email protected] 665a4017f8 getting ready to build 1999-08-03 04:59:47 +00:00
[email protected] 20705ad4e1 First Checked In. 1999-08-03 03:41:27 +00:00