author Bevis Tseng <btseng@mozilla.com>
Tue, 31 May 2016 18:08:20 +0800
changeset 346554 035505ea31497d0e07d51cda4711cebb385ca987
parent 344975 5b3be977f2a28eaeed03b68c87bd1e7fa898ed25
child 346836 2f0ead276058fdf54106e4fb2c4eb700ba2f1c94
permissions -rw-r--r--
Bug 1151017 - Support the 'close' Event on Databases. r=khuey Outline of this patch: 1. Define a new ipdl message called |CloseAfterInvalidationComplete| to trigger the close event after all transactions are complete only if the database is invalidated by the user agent. 2. Make sure the following event sequence is consistent during invalidation according to the steps in |5.2. Closing a database| by the following 2 solutions: IDBRequest.onerror -> IDBTransaction.onerror -> IDBTransaction.onabort -> IDBDatabase.onclose. 2.1. In parent process, do not force to abort the transactions after invalidation but wait for all the transactions in its child process are complete. 2.2. In child process, make sure that each IDBTransaction will notify its completion to the parent after all its pending IDBRequests are finished. 3. Add test_database_onclose.js to test the close event especially when read/write operation is ongoing. 4. Add test_database_close_without_onclose.js as a XPCShell test because setTimeout() is not preferred in Mochitest to ensure that the IDBDatabase.onclose event won't be sent after closed normally.

version: 0
  name: 'Taskcluster tasks for Gecko'
  description: "The taskcluster task graph for Gecko trees"
  owner: mozilla-taskcluster-maintenance@mozilla.com
  source: {{{source}}}

  # Note the below scopes are insecure however these get overriden on the server
  # side to whatever scopes are set by mozilla-taskcluster.
  - queue:*
  - docker-worker:*
  - scheduler:*

# Available mustache parameters (see the mozilla-taskcluster source):
# - owner:          push user (email address)
# - source:         URL of this YAML file
# - url:            repository URL
# - project:        alias for the destination repository (basename of
#                   the repo url)
# - level:          SCM level of the destination repository
#                   (1 = try, 3 = core)
# - revision:       (short) hg revision of the head of the push
# - revision_hash:  (long) hg revision of the head of the push
# - comment:        comment of the push
# - pushlog_id:     id in the pushlog table of the repository
# and functions:
# - as_slugid:      convert a label into a slugId
# - from_now:       generate a timestamp at a fixed offset from now

  - taskId: '{{#as_slugid}}decision task{{/as_slugid}}'
      created: '{{now}}'
      deadline: '{{#from_now}}1 day{{/from_now}}'
      expires: '{{#from_now}}14 day{{/from_now}}'
        owner: mozilla-taskcluster-maintenance@mozilla.com
        source: {{{source}}}
        name: "Gecko Decision Task"
        description: |
            The task that creates all of the other tasks in the task graph

      workerType: "gecko-decision"
      provisionerId: "aws-provisioner-v1"

        createdForUser: {{owner}}

        # Bug 1269443: cache scopes, etc. must be listed explicitly
        - "docker-worker:cache:level-{{level}}-*"
        - "docker-worker:cache:tooltool-cache"
        - "secrets:get:project/taskcluster/gecko/hgfingerprint"
        # mozilla-taskcluster will append the appropriate assume:repo:<repo>
        # scope here.

        - "index.gecko.v2.{{project}}.latest.firefox.decision"
        - "tc-treeherder.v2.{{project}}.{{revision}}.{{pushlog_id}}"
        - "tc-treeherder-stage.v2.{{project}}.{{revision}}.{{pushlog_id}}"

          # checkout-gecko uses these to check out the source; the inputs
          # to `mach taskgraph decision` are all on the command line.
          GECKO_BASE_REPOSITORY: 'https://hg.mozilla.org/mozilla-central'
          GECKO_HEAD_REPOSITORY: '{{{url}}}'
          GECKO_HEAD_REF: '{{revision}}'
          GECKO_HEAD_REV: '{{revision}}'

          level-{{level}}-{{project}}-tc-vcs-public-sources: /home/worker/.tc-vcs/
          level-{{level}}-{{project}}-gecko-decision: /home/worker/workspace

          taskclusterProxy: true

        # Note: This task is built server side without the context or tooling that
        # exist in tree so we must hard code the version
        image: 'taskcluster/decision:0.1.0'

        maxRunTime: 1800

          - /bin/bash
          - -cx
          - >
            mkdir -p /home/worker/artifacts &&
            checkout-gecko workspace &&
            cd workspace/gecko &&
            ln -s /home/worker/artifacts artifacts &&
            ./mach taskgraph decision

            type: 'directory'
            path: '/home/worker/artifacts'
            expires: '{{#from_now}}7 days{{/from_now}}'

          symbol: D