Closed Bug 1368560 Opened 3 years ago Closed 3 years ago

Remove Svc.Crypto

Categories

(Firefox :: Sync, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
Firefox 55
Tracking Status
firefox55 --- fixed

People

(Reporter: eoger, Assigned: eoger)

Details

Attachments

(2 files)

I would be happier if util.js only contained the Utils symbol.
In order to achieve this, we can start by moving Svc.Crypto to Weave.Crypto.
Comment on attachment 8872462 [details]
Bug 1368560 part 1 - Remove un-used legacy crypto methods.

https://reviewboard.mozilla.org/r/143962/#review147694

::: services/sync/tests/unit/test_utils_passphrase.js:10
(Diff revision 1)
> +  const pp = "26ect2thczm599m2ffqarbicjq";
> +  const hyphenated = "2-6ect2-thczm-599m2-ffqar-bicjq";
>    do_check_eq(Utils.normalizePassphrase(hyphenated), pp);
>  
>    _("Skip whitespace.");
>    do_check_eq("aaaaaaaaaaaaaaaaaaaaaaaaaa", Utils.normalizePassphrase("aaaaaaaaaaaaaaaaaaaaaaaaaa  "));

looks like these Utils functions can probably die too? (Then this test completely dies)
Attachment #8872462 - Flags: review?(markh) → review+
Comment on attachment 8872462 [details]
Bug 1368560 part 1 - Remove un-used legacy crypto methods.

https://reviewboard.mozilla.org/r/143962/#review147698

::: commit-message-34ac1:1
(Diff revision 1)
> +Bug 1368560 - Remove un-used legacy crypto methods. r?markh

oops - meant to say you should probably be consistent with the use of the "part n" - ie, a "part 2" without a "part 1" seems odd.
Comment on attachment 8872463 [details]
Bug 1368560 part 2 - Move Svc.Crypto to Weave.Crypto.

https://reviewboard.mozilla.org/r/143964/#review147700
Attachment #8872463 - Flags: review?(markh) → review+
> looks like these Utils functions can probably die too? (Then this test completely dies)

That would be bug 1368568 that I just filled then :)
Pushed by eoger@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bf392a1d0c5a
part 1 - Remove un-used legacy crypto methods. r=markh
https://hg.mozilla.org/integration/autoland/rev/c2d00a8b897b
part 2 - Move Svc.Crypto to Weave.Crypto. r=markh
Backe dout for failing xpcshell's test_ext_storage_sync.js and test_ext_storage_sync_crypto.js on Linux:

https://hg.mozilla.org/integration/autoland/rev/61cc994f34d3ac8cf13536e479c864697ad3a2a5
https://hg.mozilla.org/integration/autoland/rev/0e97e0db5f7769fd4215d64f9f23b9b1fed5c103

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=c2d00a8b897b7c48bc8526d0a754eb3570bac684&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=103499783&repo=autoland

[task 2017-05-31T20:25:05.791205Z] 20:25:05     INFO -  TEST-START | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js
[task 2017-05-31T20:25:07.621985Z] 20:25:07  WARNING -  TEST-UNEXPECTED-FAIL | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | xpcshell return code: 0
[task 2017-05-31T20:25:07.686415Z] 20:25:07     INFO -  TEST-INFO took 1833ms
[task 2017-05-31T20:25:07.686748Z] 20:25:07     INFO -  >>>>>>>
[task 2017-05-31T20:25:07.689888Z] 20:25:07     INFO -  (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2017-05-31T20:25:07.690999Z] 20:25:07     INFO -  (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2017-05-31T20:25:07.692174Z] 20:25:07     INFO -  (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2017-05-31T20:25:07.692597Z] 20:25:07     INFO -  running event loop
[task 2017-05-31T20:25:07.693991Z] 20:25:07     INFO -  PID 11397 | JavaScript strict warning: resource://services-common/kinto-http-client.js, line 1610: ReferenceError: reference to undefined property "initializer"
[task 2017-05-31T20:25:07.695397Z] 20:25:07     INFO -  PID 11397 | JavaScript strict warning: resource://services-common/kinto-http-client.js, line 1078: ReferenceError: reference to undefined property "initializer"
[task 2017-05-31T20:25:07.696801Z] 20:25:07     INFO -  PID 11397 | JavaScript strict warning: resource://services-common/kinto-http-client.js, line 339: ReferenceError: reference to undefined property "initializer"
[task 2017-05-31T20:25:07.702796Z] 20:25:07     INFO -  xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | Starting test_key_to_id
[task 2017-05-31T20:25:07.704684Z] 20:25:07     INFO -  (xpcshell/head.js) | test test_key_to_id pending (2)
[task 2017-05-31T20:25:07.706565Z] 20:25:07     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | test_key_to_id - [test_key_to_id : 537] "key-foo" == "key-foo"
[task 2017-05-31T20:25:07.708501Z] 20:25:07     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | test_key_to_id - [test_key_to_id : 538] "key-my_2D_new_2D_key" == "key-my_2D_new_2D_key"
[task 2017-05-31T20:25:07.710385Z] 20:25:07     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | test_key_to_id - [test_key_to_id : 539] "key-" == "key-"
[task 2017-05-31T20:25:07.712224Z] 20:25:07     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | test_key_to_id - [test_key_to_id : 540] "key-_2122_" == "key-_2122_"
[task 2017-05-31T20:25:07.714044Z] 20:25:07     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | test_key_to_id - [test_key_to_id : 541] "key-_8_" == "key-_8_"
[task 2017-05-31T20:25:07.716021Z] 20:25:07     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | test_key_to_id - [test_key_to_id : 542] "key-abc_A_def" == "key-abc_A_def"
[task 2017-05-31T20:25:07.718467Z] 20:25:07     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | test_key_to_id - [test_key_to_id : 543] "key-Kinto_27_s_20_fancy_5F_string" == "key-Kinto_27_s_20_fancy_5F_string"
[task 2017-05-31T20:25:07.724356Z] 20:25:07     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | test_key_to_id - [test_key_to_id : 547] "foo" == "foo"
[task 2017-05-31T20:25:07.726796Z] 20:25:07     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | test_key_to_id - [test_key_to_id : 547] "my-new-key" == "my-new-key"
[task 2017-05-31T20:25:07.728825Z] 20:25:07     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | test_key_to_id - [test_key_to_id : 547] "" == ""
[task 2017-05-31T20:25:07.730911Z] 20:25:07     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | test_key_to_id - [test_key_to_id : 547] "Kinto's fancy_string" == "Kinto's fancy_string"
[task 2017-05-31T20:25:07.733236Z] 20:25:07     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | test_key_to_id - [test_key_to_id : 547] "â„¢" == "â„¢"
[task 2017-05-31T20:25:07.735312Z] 20:25:07     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | test_key_to_id - [test_key_to_id : 547] "\\b" == "\\b"
[task 2017-05-31T20:25:07.737623Z] 20:25:07     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | test_key_to_id - [test_key_to_id : 550] null == null
[task 2017-05-31T20:25:07.739705Z] 20:25:07     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | test_key_to_id - [test_key_to_id : 551] null == null
[task 2017-05-31T20:25:07.742980Z] 20:25:07     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | test_key_to_id - [test_key_to_id : 552] null == null
[task 2017-05-31T20:25:07.745148Z] 20:25:07     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | test_key_to_id - [test_key_to_id : 553] null == null
[task 2017-05-31T20:25:07.747251Z] 20:25:07     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | test_key_to_id - [test_key_to_id : 554] null == null
[task 2017-05-31T20:25:07.749110Z] 20:25:07     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | test_key_to_id - [test_key_to_id : 555] null == null
[task 2017-05-31T20:25:07.752089Z] 20:25:07     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | test_key_to_id - [test_key_to_id : 556] "" == ""
[task 2017-05-31T20:25:07.754004Z] 20:25:07     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | test_key_to_id - [test_key_to_id : 557] "1" == "1"
[task 2017-05-31T20:25:07.755864Z] 20:25:07     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | test_key_to_id - [test_key_to_id : 558] "-" == "-"
[task 2017-05-31T20:25:07.757628Z] 20:25:07     INFO -  (xpcshell/head.js) | test run_next_test 0 finished (2)
[task 2017-05-31T20:25:07.760142Z] 20:25:07     INFO -  (xpcshell/head.js) | test run_next_test 1 pending (2)
[task 2017-05-31T20:25:07.761798Z] 20:25:07     INFO -  (xpcshell/head.js) | test test_key_to_id finished (2)
[task 2017-05-31T20:25:07.767126Z] 20:25:07     INFO -  "CONSOLE_MESSAGE: (warn) [JavaScript Warning: "ReferenceError: reference to undefined property "initializer"" {file: "resource://services-common/kinto-http-client.js" line: 1610}]"
[task 2017-05-31T20:25:07.769078Z] 20:25:07     INFO -  "CONSOLE_MESSAGE: (warn) [JavaScript Warning: "ReferenceError: reference to undefined property "initializer"" {file: "resource://services-common/kinto-http-client.js" line: 1078}]"
[task 2017-05-31T20:25:07.771005Z] 20:25:07     INFO -  "CONSOLE_MESSAGE: (warn) [JavaScript Warning: "ReferenceError: reference to undefined property "initializer"" {file: "resource://services-common/kinto-http-client.js" line: 339}]"
[task 2017-05-31T20:25:07.772799Z] 20:25:07     INFO -  xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | Starting test_extension_id_to_collection_id
[task 2017-05-31T20:25:07.774530Z] 20:25:07     INFO -  (xpcshell/head.js) | test test_extension_id_to_collection_id pending (2)
[task 2017-05-31T20:25:07.776243Z] 20:25:07     INFO -  (xpcshell/head.js) | test run_next_test 1 finished (2)
[task 2017-05-31T20:25:07.778050Z] 20:25:07     INFO -  PID 11397 | JavaScript strict warning: resource://services-common/kinto-offline-client.js, line 2309: ReferenceError: reference to undefined property "synced"
[task 2017-05-31T20:25:07.785577Z] 20:25:07     INFO -  "CONSOLE_MESSAGE: (warn) [JavaScript Warning: "ReferenceError: reference to undefined property "synced"" {file: "resource://services-common/kinto-offline-client.js" line: 2309}]"
[task 2017-05-31T20:25:07.787798Z] 20:25:07     INFO -  TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | test_extension_id_to_collection_id - [test_extension_id_to_collection_id : 572] "ext-0_QHA1P93_yJoj7ONisrR0lW6uN4PZ3Ii-rT-QOjtvo" == "ext-0_QHA1P93_yJoj7ONisrR0lW6uN4PZ3Ii-rT-QOjtvo"
[task 2017-05-31T20:25:07.789560Z] 20:25:07     INFO -  (xpcshell/head.js) | test run_next_test 2 pending (2)
[task 2017-05-31T20:25:07.791294Z] 20:25:07     INFO -  (xpcshell/head.js) | test test_extension_id_to_collection_id finished (2)
[task 2017-05-31T20:25:07.793064Z] 20:25:07     INFO -  xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js | Starting ensureCanSync_posts_new_keys
[task 2017-05-31T20:25:07.794775Z] 20:25:07     INFO -  (xpcshell/head.js) | test ensureCanSync_posts_new_keys pending (2)
[task 2017-05-31T20:25:07.796442Z] 20:25:07     INFO -  (xpcshell/head.js) | test run_next_test 2 finished (2)
[task 2017-05-31T20:25:07.798252Z] 20:25:07     INFO -  PID 11397 | JavaScript strict warning: resource://services-common/kinto-http-client.js, line 520: ReferenceError: reference to undefined property "headers"
[task 2017-05-31T20:25:07.800181Z] 20:25:07     INFO -  PID 11397 | JavaScript strict warning: resource://services-common/kinto-http-client.js, line 1135: ReferenceError: reference to undefined property "headers"
[task 2017-05-31T20:25:07.802212Z] 20:25:07     INFO -  "CONSOLE_MESSAGE: (warn) [JavaScript Warning: "ReferenceError: reference to undefined property "headers"" {file: "resource://services-common/kinto-http-client.js" line: 520}]"
[task 2017-05-31T20:25:07.804263Z] 20:25:07     INFO -  "CONSOLE_MESSAGE: (warn) [JavaScript Warning: "ReferenceError: reference to undefined property "headers"" {file: "resource://services-common/kinto-http-client.js" line: 1135}]"
[task 2017-05-31T20:25:07.806483Z] 20:25:07     INFO -  PID 11397 | JavaScript strict warning: resource://services-common/kinto-http-client.js, line 735: ReferenceError: reference to undefined property "stringify"
[task 2017-05-31T20:25:07.811053Z] 20:25:07     INFO -  "CONSOLE_MESSAGE: (warn) [JavaScript Warning: "ReferenceError: reference to undefined property "stringify"" {file: "resource://services-common/kinto-http-client.js" line: 735}]"
[task 2017-05-31T20:25:07.812843Z] 20:25:07     INFO -  Unexpected exception TypeError: Svc.Crypto is undefined at resource://gre/modules/ExtensionStorageSync.jsm:183
[task 2017-05-31T20:25:07.814566Z] 20:25:07     INFO -  encode@resource://gre/modules/ExtensionStorageSync.jsm:183:9
[task 2017-05-31T20:25:07.816238Z] 20:25:07     INFO -  async*encode@resource://gre/modules/ExtensionStorageSync.jsm:303:27
[task 2017-05-31T20:25:07.817955Z] 20:25:07     INFO -  async*[6]</_encodeRecord/</<@resource://services-common/kinto-offline-client.js:1279:24
[task 2017-05-31T20:25:07.822757Z] 20:25:07     INFO -  _do_main@/home/worker/workspace/build/tests/xpcshell/head.js:222:5
[task 2017-05-31T20:25:07.824479Z] 20:25:07     INFO -  _execute_test@/home/worker/workspace/build/tests/xpcshell/head.js:550:5
[task 2017-05-31T20:25:07.826091Z] 20:25:07     INFO -  @-e:1:1
[task 2017-05-31T20:25:07.827788Z] 20:25:07     INFO -  exiting test
[task 2017-05-31T20:25:07.829393Z] 20:25:07     INFO -  <<<<<<<
[task 2017-05-31T20:25:07.831125Z] 20:25:07     INFO -  TEST-START | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync_crypto.js
[task 2017-05-31T20:25:08.579448Z] 20:25:08  WARNING -  TEST-UNEXPECTED-FAIL | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_storage_sync_crypto.js | xpcshell return code: 0
Flags: needinfo?(eoger)
Flags: needinfo?(eoger)
Pushed by eoger@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/732d5e2ec5d7
part 1 - Remove un-used legacy crypto methods. r=markh
https://hg.mozilla.org/integration/autoland/rev/d71442ad6f31
part 2 - Move Svc.Crypto to Weave.Crypto. r=markh
https://hg.mozilla.org/mozilla-central/rev/732d5e2ec5d7
https://hg.mozilla.org/mozilla-central/rev/d71442ad6f31
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
You need to log in before you can comment on or make changes to this bug.