Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Перейти к файлу
Boris Zbarsky 8db444c416 Bug 1254393. Take ownership of error reporting on the AutoEntryScript in nsXPCWrappedJSClass::CallMethod. r=bholley
There are several cases to consider in terms of where exceptions might come from
here:

1)  We could have an exception on the JSContext already when we set up the
AutoEntryScript.  In practice this does not happen, and once this change is made
we will add an assert to that effect in AutoJSAPI::InitInternal.  See bug 1112920.

2)  We could have an exception thrown by the XPCCallContext constructor, but it
never does that when initialized, as here, without a JSObject*.

3)  We can have an exception thrown by CallMethod itself, if the callee method
wants a JSContext or optional argc.  This patch switches that to using
CheckForException, which means it will behave exactly like exceptions thrown
from the actual implementation of the method we're calling in terms of how it's
reported and whether it's rethrown to callers, if any.

4)  We can have exceptions thrown various places (e.g. during argument and
retval/outparam conversions) after this point, but those are all under the scope
of the AutoScriptEvaluate, whose destructor will restore the JSContext state to whatever it
was when the AutoScriptEvaluate was created.  Since the AutoScriptEvaluate goes
out of scope before the AutoEntryScript does, there will be no dangling
exception on the JSContext at that point.

5)  We can have exceptions thrown by the actual method call.  Those are
reported, as needed, via CheckForException, and will continue to be so reported.

So in general there are two behavior changes here:

* We now treat the "callee wants JSContext or argc" case as the same as an
  exception from the callee, which is not what we used to do.

* If the object we're calling comes from an inner window whose outer window has
  been torn down, we will now correctly report the exception against that inner
  window.  Before this patch, what happend is that we would init the
  AutoEntryScript with the inner window, but FindJSContext would not find an
  nsIScriptContext on it (since its outer has been torn down), so we would use
  the safe JS context.  Then in xpc::SystemErrorReporter we would check for a
  window associated with the JSContext, not find one, check for an addon sandbox
  current compartment, see we're not in one, and then use the privileged junk
  scope for its error reporting.  The new setup in AutoJSAPI::ReportError checks
  for the current compartent being a window, which of course it is.
2016-03-08 17:21:40 -05:00
accessible Bug 1249730 - make TreeWalker bi-directional, r=yzen 2016-03-08 08:27:59 -05:00
addon-sdk Bug 1170258 - Cache UUID module for context menus (rs=Mossop) 2016-03-02 12:56:51 -08:00
b2g Bug 1254451 - Better document toolchain versions in tooltool manifests. r=froydnj 2016-03-09 09:23:27 +09:00
browser Bug 1254451 - Better document toolchain versions in tooltool manifests. r=froydnj 2016-03-09 09:23:27 +09:00
build Bug 1254410 - Include app-specific configure files according to --enable-application/--enable-project. r=chmanchester 2016-03-09 09:23:27 +09:00
caps Bug 1238160 - Test frame principal when toggling isolation. r=bz 2016-03-02 10:35:56 -06:00
chrome Bug 1244074 - Part 4: Use StyleSheetHandle instead of concrete style sheet class in most places. r=dholbert 2016-02-24 18:01:12 +11:00
config merge inbound to m-c a=merge 2016-03-08 16:00:45 -08:00
db/sqlite3 Bug 1252937 - Build sqlite with -DSQLITE_ENABLE_FTS3_TOKENIZER to get the two-argument version of fts3_tokenizer() function back. r=asuth 2016-03-03 11:10:00 -05:00
devtools merge inbound to m-c a=merge 2016-03-08 16:00:45 -08:00
docshell Bug 1253738 P1 Require an explicit principal when looking up a service worker registration. r=baku 2016-03-08 06:55:41 -08:00
dom Bug 1254230 kinda-fix. Make sure to never send script errors with stacks attached to the console service if the associated windows have already had FreeInnerObjects called on them. r=bholley 2016-03-08 17:21:40 -05:00
editor Bug 1253424 - part 2 - add nsTransactionStack::IsEmpty; r=erahm 2016-03-03 16:13:18 -05:00
embedding Bug 1254410 - Include app-specific configure files according to --enable-application/--enable-project. r=chmanchester 2016-03-09 09:23:27 +09:00
extensions Bug 1254410 - Include app-specific configure files according to --enable-application/--enable-project. r=chmanchester 2016-03-09 09:23:27 +09:00
gfx Backed out changeset 6358a64e4f15 (bug 1236112) for windows video wpt failures 2016-03-08 16:23:04 -08:00
gradle/wrapper No bug - Include distributionSha256Sum in Gradle wrapper. r=me 2016-02-10 21:06:38 -08:00
hal Bug 1253571 - Remove the remaining uses of ScopedDeletePtr and ScopedFreePtr from the HAL and MTP code r=dhylands 2016-03-04 15:15:38 +01:00
image Bug 1253362. SVGDocumentWrapper::IsAnimated can be called after SVGDocumentWrapper::DestroyViewer so null check mViewer. r=dholbert 2016-03-06 14:59:19 -06:00
intl Bug 1251780 - Remove unicharutil_standalone library. r=rbarker 2016-03-03 12:16:41 -08:00
ipc Bug 1254471 - Fix MessageChannel.cpp error unused variable transaction. r=billm 2016-03-08 16:53:43 +01:00
js Bug 1254393. Take ownership of error reporting on the AutoEntryScript in nsXPCWrappedJSClass::CallMethod. r=bholley 2016-03-08 17:21:40 -05:00
layout Backed out changeset e7e01671e85f (bug 1253977) for windows reftest failures in focusring-1.html CLOSED TREE 2016-03-08 16:07:00 -08:00
media Bug 1253471 - Remove Metadata hard-coded limit - r=jya 2016-03-08 17:25:33 +11:00
memory Bug 1253526 (part 2) - Gut DMD's usage message. r=erahm 2016-03-04 17:12:37 +11:00
mfbt Bug 1253094, part 11 - Make DebugOnly a MOZ_STACK_CLASS. r=Waldo 2016-02-26 15:52:08 +00:00
mobile Bug 1254451 - Better document toolchain versions in tooltool manifests. r=froydnj 2016-03-09 09:23:27 +09:00
modules Bug 1254493 - Remove Code2000 and Arial Unicode MS from prefs. r=jfkthame 2016-03-08 23:19:26 +09:00
mozglue Bug 1251881 - use UniquePtr instead of ScopedDeletePtr in mozglue/linker/; r=glandium 2016-02-26 13:50:59 -05:00
netwerk Bug 1253094, part 6 - Stop using DebugOnly for class/struct members in netwerk/. r=mayhemer 2016-02-26 15:52:07 +00:00
nsprpub Bug 1244062, Upgrade Firefox 47 to NSPR 4.12, final version numbers, no code changes, r=me 2016-02-22 16:48:20 +01:00
other-licenses Bug 1218816 - Remove useless semicolons. Found by coccinelle. r=Ehsan 2016-01-22 16:58:49 +01:00
parser Bug 1232780 - Adjust test exclusions for win7 debug e10s, a=test-only 2016-03-01 10:36:31 -08:00
probes Bug 1253622 - Move the mozilla-trace.h generation into moz.build; r=ted 2016-03-07 14:59:13 +01:00
python Merge m-c to inbound, a=merge CLOSED TREE 2016-03-08 16:08:08 -08:00
rdf Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
release/docker Bug 1252908 - [beetmover] refresh AV database on every run r=rail a=testing DONTBUILD 2016-03-02 16:36:31 -05:00
security Bug 1254306 - Do not check the fallback limit version for the RC4 fallback. r=keeler 2016-03-09 07:38:43 +09:00
services merge inbound to m-c a=merge 2016-03-08 16:00:45 -08:00
startupcache Bug 1249389 - part 7 - clean up calls to GetBuffer in TestStartupCache; r=erahm 2016-02-18 14:57:14 -05:00
storage Bug 1253094, part 7 - Stop using DebugOnly for class/struct members in storage/. r=mak 2016-02-26 15:52:08 +00:00
testing Bug 1254293. Fix dom::GetArrayIndexFromId to actually follow the spec for large indices (i.e. ones that don't fit in in int32_t). r=peterv 2016-03-08 17:21:40 -05:00
toolkit Bug 1254410 - Include app-specific configure files according to --enable-application/--enable-project. r=chmanchester 2016-03-09 09:23:27 +09:00
tools Bug 1252294 - Add python/futures to sys.path when building Sphinx docs; r=chmanchester 2016-02-29 16:08:34 -08:00
uriloader Bug 1253094, part 8 - Stop using DebugOnly for class/struct members in uriloader/. r=bz 2016-02-26 15:52:08 +00:00
view Bug 1239864 (part 10) - Use the new rect iterators in view/ and widget/. r=roc. 2016-01-18 17:20:59 -08:00
widget Bug 1254151 - use B8G8R8X8 for 24 bit depth visuals in nsShmImage with Cairo. r=jrmuizel 2016-03-08 11:18:13 -05:00
xpcom Merge m-c to inbound, a=merge CLOSED TREE 2016-03-08 16:08:08 -08:00
xpfe Bug 1242449 - Fix confusion among CSS, desktop and device pixel units in nsXULWindow position/size and window staggering so as to work consistently across mixed resolution displays. r=emk 2016-03-01 21:05:10 +00:00
.clang-format Bug 961541 - Make Clang-Format ignore all comments. r=mystor 2015-06-26 12:38:44 -07:00
.clang-format-ignore Bug 967361 - Fix .clang-format-ignore on Windows. r=gps 2014-02-04 17:25:04 +13:00
.eslintignore Bug 1238079 - remove the desktop web runtime; r=fabrice,mossop,gps,jryans,jmaher,marco 2016-03-07 13:33:12 -08:00
.eslintrc Bug 1245916: Unify eslint global discovery rules. r=pbrosset 2016-02-05 11:37:50 -08:00
.gdbinit Backed out changeset 047d21f101de (bug 846018) 2014-11-13 17:11:25 -05:00
.gitignore Bug 1252446 - Sync global .gitignore and .hgignore for various missing unwanted files. r=gps DONTBUILD 2016-03-01 15:18:22 +01:00
.hgignore Bug 1252446 - Sync global .gitignore and .hgignore for various missing unwanted files. r=gps DONTBUILD 2016-03-01 15:18:22 +01:00
.hgtags No bug - Tagging mozilla-central 68d3781deda0d4d58ec9877862830db89669b3a5 with FIREFOX_AURORA_47_BASE a=release DONTBUILD CLOSED TREE 2016-03-07 09:21:14 -05:00
.lldbinit Bug 1254128 - Make the Mozilla .lldbinit use the full path for topsrcdir. r=sparky 2016-03-01 16:36:08 +00:00
.ycm_extra_conf.py Bug 1162714 - Don't let YCM generate machc. r=ehsan 2015-05-07 13:48:00 +02:00
AUTHORS Bug 992096 - Implement Sub Resource Integrity [1/2]. r=baku,r=ckerschb 2015-08-12 20:19:11 -07:00
Android.mk Bug 794297: Block the android build system from looking in mozilla-central. r=mwu 2012-09-25 17:04:01 -07:00
CLOBBER merge inbound to m-c a=merge 2016-03-08 16:00:45 -08:00
GNUmakefile Bug 794723 - Add a default makefile which wraps mach. r=gps 2015-02-06 10:26:00 -08:00
LEGAL
LICENSE
Makefile.in Bug 623183 - Build dump_syms on Windows when using VS2015; r=ted 2016-03-08 14:07:28 -08:00
README.txt No bug, Update README.txt for ftp changes, r=bustage-check CLOSED TREE 2015-08-30 21:53:27 +12:00
aclocal.m4 Bug 1253502 - Move python virtualenv initialization to moz.configure. r=gps 2016-03-08 15:41:32 +09:00
build.gradle Bug 1233882 - Post: Update Android Gradle plugin to 1.5.0. r=me 2016-02-17 19:16:41 -08:00
client.mk Bug 1253057 - Record PGO phases as build tiers; r=ted 2016-03-03 09:47:44 -08:00
client.py Bug 988724: Remove webidl updating bits from client.py that are long dead. r=glandium 2014-04-01 11:33:27 +08:00
configure.in Bug 1250294 - Make configure a Python script that invokes the old configure.sh. r=ted 2016-02-25 07:22:33 +09:00
configure.py Bug 1253502 - Move python virtualenv initialization to moz.configure. r=gps 2016-03-08 15:41:32 +09:00
gradle.properties Bug 1218370 - Use Gradle daemon in srcdir builds. r=me 2015-10-26 09:28:14 -07:00
gradlew Bug 1123416 - Part 1: Make topsrcdir a valid Gradle project root. r=sebastian 2015-10-21 15:07:55 -07:00
mach Bug 1058923 - Package mach in tests.zip; create bootstrap script for test package, r=gps 2015-05-01 12:20:55 -04:00
moz.build Bug 1245953 - Convert TaskCluster docs to Sphinx; r=garndt 2016-02-17 10:24:06 -08:00
moz.configure Bug 1254410 - Include app-specific configure files according to --enable-application/--enable-project. r=chmanchester 2016-03-09 09:23:27 +09:00
mozilla-config.h.in Bug 1231314 - Turn mozilla-config.h and js-confdefs.h into CONFIGURE_DEFINE_FILES. r=gps 2015-12-15 08:06:11 +09:00
old-configure.in Bug 1254410 - Include app-specific configure files according to --enable-application/--enable-project. r=chmanchester 2016-03-09 09:23:27 +09:00
settings.gradle Bug 1233882 - Fold base Gradle project into app Gradle project. r=sebastian,mcomella 2016-02-17 19:25:54 -08:00
test.mozbuild Bug 1229233 - Add a (incomplete) end-to-end build test. r=gps 2015-12-01 13:57:52 +09:00

README.txt

An explanation of the Mozilla Source Code Directory Structure and links to
project pages with documentation can be found at:

    https://developer.mozilla.org/en/Mozilla_Source_Code_Directory_Structure

For information on how to build Mozilla from the source code, see:

    http://developer.mozilla.org/en/docs/Build_Documentation

To have your bug fix / feature added to Mozilla, you should create a patch and
submit it to Bugzilla (https://bugzilla.mozilla.org). Instructions are at:

    http://developer.mozilla.org/en/docs/Creating_a_patch
    http://developer.mozilla.org/en/docs/Getting_your_patch_in_the_tree

If you have a question about developing Mozilla, and can't find the solution
on http://developer.mozilla.org, you can try asking your question in a
mozilla.* Usenet group, or on IRC at irc.mozilla.org. [The Mozilla news groups
are accessible on Google Groups, or news.mozilla.org with a NNTP reader.]

You can download nightly development builds from the Mozilla FTP server.
Keep in mind that nightly builds, which are used by Mozilla developers for
testing, may be buggy. Firefox nightlies, for example, can be found at:

    https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/
            - or -
    http://nightly.mozilla.org/