Граф коммитов

48 Коммитов

Автор SHA1 Сообщение Дата
Dylan Roeh 041f83edff Bug 1262251 - Make openWindow() launch Fennec if it isn't already running. r=catalinb 2016-10-31 14:10:25 -05:00
Boris Zbarsky c2d8d70720 Bug 1222516 part 1. Add a window API for opening a window with navigation and a given docshell loadinfo to use for the navigation. r=mconley
This will be used to pass through information like the triggering principal and
whatnot, as well as the boolean for not sending a referrer, for rel=noreferrer
links.
2016-10-20 16:52:38 -04:00
Boris Zbarsky 39be7c954d Bug 1267339 part 3. Add support for the noopener window feature in windowwatcher. r=mconley 2016-10-20 16:52:38 -04:00
Boris Zbarsky 9c68071fa2 Bug 1267339 part 2. Push maintenance of the popup spam count down into the window watcher. r=mconley 2016-10-20 16:52:38 -04:00
Boris Zbarsky fe57b51a79 Bug 1267339 part 1. Remove the unused aOpenerFullZoom argument to nsPIWindowWatcher::OpenWindow2. r=mconley 2016-10-20 16:52:37 -04:00
Ben Kelly f1f3b13517 Bug 1300658 P5 Make service worker APIs use the MainThreadTaskQueue. r=baku 2016-09-13 20:14:02 -07:00
Wes Kocher 17b9381e0b Backed out 6 changesets (bug 1300658) for frequent Windows VM Xpcshell failures a=backout
Backed out changeset 6cf3a60640cf (bug 1300658)
Backed out changeset c74062a27462 (bug 1300658)
Backed out changeset 39fbc61739ef (bug 1300658)
Backed out changeset 0b9d70b040a2 (bug 1300658)
Backed out changeset 4e921d61f036 (bug 1300658)
Backed out changeset 56496fad6494 (bug 1300658)
2016-09-12 16:34:08 -07:00
Ben Kelly 9b3174b58d Bug 1300658 P5 Make service worker APIs use the MainThreadTaskQueue. r=baku 2016-09-12 12:32:21 -07:00
Ben Kelly a8a4ae3c4f Backout rev 5c7368370ff9 to 980659720b86 (bug 1300118 and bug 1300658) for incorrect bug number in commit message. r=me 2016-09-12 12:29:17 -07:00
Ben Kelly cb975cddf1 Bug 1300658 P5 Make service worker APIs use the MainThreadTaskQueue. r=baku 2016-09-12 11:21:02 -07:00
Nicholas Nethercote 34dcc7b852 Bug 1299384 - Use MOZ_MUST_USE with NS_warn_if_impl(). r=erahm.
This change avoids lots of false positives for Coverity's CHECKED_RETURN
warning, caused by NS_WARN_IF's current use in both statement-style and
expression-style.

In the case where the code within the NS_WARN_IF has side-effects, I made the
following change.

> NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));
> -->
> Unused << NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));

In the case where the code within the NS_WARN_IF lacks side-effects, I made the
following change.

> NS_WARN_IF(!condWithoutSideEffects);
> -->
> NS_WARNING_ASSERTION(condWithoutSideEffects, "msg");

This has two improvements.
- The condition is not evaluated in non-debug builds.
- The sense of the condition is inverted to the familiar "this condition should
  be true" sense used in assertions.

A common variation on the side-effect-free case is the following.

> nsresult rv = Fn();
> NS_WARN_IF_(NS_FAILED(rv));
> -->
> DebugOnly<nsresult rv> = Fn();
> NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Fn failed");

--HG--
extra : rebase_source : 58788245021096efa8372a9dc1d597a611d45611
2016-09-02 17:12:24 +10:00
Kaku Kuo a6ed727230 Bug 1292091 - Part 2 - replace MaybeResolve(JS::UndefinedHandleValue) with MaybeResolveWithUndefined(); r=bz
MozReview-Commit-ID: KNbxVcCVqts

--HG--
extra : transplant_source : %1D%18%E5%C9o%F0%29%E7%E0%93%EEcR%C7B%3BeX%B3%87
2016-08-09 17:15:13 +08:00
Mike Conley 688f1f9516 Bug 1261842 - Factor out logic for creating windows for content processes from nsWindowWatcher::OpenWindowInternal. r=smaug
MozReview-Commit-ID: 1dhGthT8bmu

--HG--
extra : rebase_source : 34d321ebd3c27f414c63c72908c72d23aabb5396
extra : source : 0f8b603781817f58c4664a33429325bc316598e9
2016-07-05 12:00:07 -04:00
Andrea Marchesini 7fc60537c1 Bug 1280067 - WorkerThreadModifyBusyCount should be the default value for WorkerRunnable, r=sicking 2016-06-28 19:28:13 +02:00
Kyle Huey c73656947b Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Catalin Badea 5082e816d8 Bug 1248772 - Trigger a OS window focus in ServiceWorkerClients::OpenWindow. r=ehsan 2016-03-31 16:06:00 +02:00
Kyle Huey d9265a3eaf Bug 1259294: Part 2 - Use MOZ_ALWAYS_SUCCEEDS. r=froydnj 2016-03-28 10:28:15 -07:00
Ehsan Akhgari 100dda0d7d Bug 1258056 - Propagate the window opener full page zoom across the IPC layer; r=smaug 2016-03-22 17:49:09 -04:00
Kyle Huey d11b9db617 Bug 1257032: Make files in dom/workers actually build without unification. r=baku 2016-03-16 11:51:11 -07:00
Boris Zbarsky f47268eca8 Bug 1252127. Remove unnecessary JSContext argument from PromiseWorkerProxy::CleanUp. r=khuey 2016-02-29 14:52:42 -05:00
Boris Zbarsky 7345c5edb1 Bug 1251045 part 4. Remove the JSContext argument of WorkerRunnable::Dispatch. r=khuey 2016-02-26 15:23:12 -05:00
Kyle Huey 91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Catalin Badea 54a27691d4 Bug 1221992 - Prevent ServiceWorkerClients.OpenWindow from opening tabs in private mode windows. r=smaug 2015-12-11 13:32:15 -05:00
Sebastian Hengst 114ca318d6 Backed out 2 changesets (bug 1221992) for almost permafailing M-e10s(2) on Linux debug. r=backout
Backed out changeset ad20808dd3c4 (bug 1221992)
Backed out changeset 7cdcda3e65fb (bug 1221992)
2015-12-05 21:13:41 +01:00
Catalin Badea b675b2325d Bug 1221992 - Prevent ServiceWorkerClients.OpenWindow from opening tabs in private mode windows. r=smaug 2015-12-04 19:14:44 +02:00
Wes Kocher bfbadfd96d Backed out 2 changesets (bug 1221992) for windows debug assertions in browser_perf-categories-js-calltree.js
Backed out changeset bcd90e591038 (bug 1221992)
Backed out changeset 6affaa386b9b (bug 1221992)

--HG--
extra : commitid : 4w08gUrbqQr
2015-12-03 15:56:59 -08:00
Catalin Badea 889982d7af Bug 1221992 - Prevent ServiceWorkerClients.OpenWindow from opening tabs in private mode windows. r=smaug 2015-12-03 23:19:29 +02:00
Ehsan Akhgari 6c4573cf9e Bug 1229056 - Implement ClientQueryOptions.includeUncontrolled; r=jdm 2015-12-02 20:37:03 -05:00
Ehsan Akhgari 5ac100af7e Bug 1222464 - Part 3: Implement Clients.get(); r=jdm 2015-12-02 20:37:01 -05:00
Marco Castelluccio aafd2c9f63 Bug 1222097 - Resolve the openWindow URL using the service worker URL as the base URL. r=bkelly 2015-11-06 08:39:00 +01:00
Catalin Badea 8255b13467 Bug 1172870 - Part 2 - Enable ServiceWorkerClients::OpenWindow on e10s desktop. r=smaug 2015-10-30 01:30:57 +02:00
Catalin Badea cc62c14549 Bug 1172870 - Implement service workers clients.openWindow for desktop (non-e10s). r=baku,smaug
Based on patches from:
  Nikhil Marathe <nsm.nikhil@gmail.com>
  Alberto Crespell Perez <alberto.crespell@gmail.com>
2015-10-24 15:16:23 +03:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Nikhil Marathe 548809dc68 Bug 1197421 - Fix promise worker proxy cleanup and update callers. r=catalinb
Get rid of having users dispatch control runnables. It was error prone and
required too much reasoning. It was also possible to end up in a state where
callers would dispatch a WorkerRunnable, which would succeed, so they would not
dispatch a WorkerControlRunnable. Then the worker would stop Running,
canceling and releasing the runnable leading to releasing the proxy in an
unclean state. Instead, we AddRef() and add the feature and remove the feature
and Release() on Notify(). If callers successfully run a WorkerRunnable they
clean the proxy. If not, the proxy stays alive until the worker switches to
Canceling state.

--HG--
extra : commitid : BnnijSibVYe
extra : rebase_source : 15f6810dfbd0c88a983196de401c55e782b1d1d8
2015-09-02 10:07:26 -07:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Andrea Marchesini a71e717b67 Bug 1162088 - patch 1 - ServiceWorkerManager should use OriginAttributes from the principal as scopeKey, r=nsm, r=bholley 2015-06-03 09:43:43 +01:00
Catalin Badea 8b1fbc7805 Bug 1130684 - Implement Service Worker clients.claim. r=nsm,ehsan
--HG--
extra : rebase_source : ea1da8f6dfd8d31936c0ae495ec262581c9e5775
2015-05-14 12:41:42 -07:00
Andrew McCreight 9e8f4b219e Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Doug Turner c3022641a3 Bug 1151664 - Make claim return undefined for now. r=nsm 2015-04-10 20:19:28 -07:00
Catalin Badea 8d978700de Bug 1130686 - Refactor PromiseHolder in the service worker clients code. r=nsm 2015-04-07 16:25:08 +03:00
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Boris Zbarsky dc24477d79 Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp.  The
rest of this diff was generated by running the following commands:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 10:13:33 -04:00
Catalin Badea c230b69ed6 Bug 1058311 - Update client interface. Implement matchAll WindowClient. r=baku 2015-03-06 15:04:49 +02:00
Catalin Badea 9804afb257 Bug 1058311 - Remove prefix for SWClients. Rename getServiced to matchAll. Add stub query options for matchAll r=baku
--HG--
rename : dom/webidl/ServiceWorkerClient.webidl => dom/webidl/Client.webidl
rename : dom/webidl/ServiceWorkerClients.webidl => dom/webidl/Clients.webidl
rename : dom/workers/test/serviceworkers/test_get_serviced.html => dom/workers/test/serviceworkers/test_match_all.html
2015-02-20 17:16:17 +02:00
Boris Zbarsky 436b43b3ce Bug 1132655. Don't allow conversions from DOMString to const XPCOM string references, since it's meant to be an outparam only. r=smaug 2015-02-12 18:39:26 -05:00
Catalin Badea 93daa16eec Bug 982726 - Patch 1.4 - Fix second crash scenario caused by a race in PromiseHolder. r=baku 2014-10-30 16:13:00 +01:00
Catalin Badea 9dc63e370d Bug 982726 - Patch 1.3 - Fix crash caused by a race condition in PromiseHolder. r=baku 2014-10-28 10:29:00 +01:00
Catalin Badea 610145e67c Bug 982726 - Patch 1.1 - Service Worker: ServiceWorkerClients and Client interfaces with getServiced(). r=baku 2014-10-27 12:03:00 +01:00