Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app-logic/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export const PROFILER_SERVER_ORIGIN = 'https://api.profiler.firefox.com';
// [1] https://github.com/mstange/profiler-symbol-server/

// This is the default server.
export const SYMBOL_SERVER_URL = 'https://symbolication.services.mozilla.com';
export const SYMBOL_SERVER_URL = 'https://mozilla.symbols.samplyprofiler.com';

// See the MarkerPhase type for more information.
export const INSTANT: MarkerPhase = 0;
Expand Down
1 change: 1 addition & 0 deletions src/selectors/url-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ function _shouldAllowSymbolServerUrl(symbolServerUrl: string) {
const otherAllowedHostnames = [
'symbols.mozilla.org',
'symbolication.services.mozilla.com',
'mozilla.symbols.samplyprofiler.com',
];
if (!otherAllowedHostnames.includes(url.hostname)) {
console.error(
Expand Down
6 changes: 3 additions & 3 deletions src/test/__snapshots__/url-handling.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ exports[`symbolServerUrl will allow an allowed https host 1`] = `Array []`;
exports[`symbolServerUrl will error when switching to an allowed but non-https host 1`] = `
Array [
Array [
"HTTPS is required for non-localhost symbol servers. Rejecting http://symbolication.services.mozilla.com/ and defaulting to https://symbolication.services.mozilla.com.",
"HTTPS is required for non-localhost symbol servers. Rejecting http://symbolication.services.mozilla.com/ and defaulting to https://mozilla.symbols.samplyprofiler.com.",
],
]
`;

exports[`symbolServerUrl will error when switching to an invalid host 1`] = `
Array [
Array [
"The symbol server URL was not valid. Rejecting invalid and defaulting to https://symbolication.services.mozilla.com.",
"The symbol server URL was not valid. Rejecting invalid and defaulting to https://mozilla.symbols.samplyprofiler.com.",
[TypeError: Invalid URL: invalid],
],
]
Expand All @@ -24,7 +24,7 @@ Array [
exports[`symbolServerUrl will error when switching to an unknown host 1`] = `
Array [
Array [
"The symbol server URL was not in the list of allowed domains. Rejecting https://symbolication.services.mozilla.com.example.com/symbols and defaulting to https://symbolication.services.mozilla.com.",
"The symbol server URL was not in the list of allowed domains. Rejecting https://symbolication.services.mozilla.com.example.com/symbols and defaulting to https://mozilla.symbols.samplyprofiler.com.",
],
]
`;
Expand Down
11 changes: 6 additions & 5 deletions src/test/store/receive-profile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ import {
simulateOldWebChannelAndFrameScript,
simulateWebChannel,
} from '../fixtures/mocks/web-channel';
import { SYMBOL_SERVER_URL } from 'firefox-profiler/app-logic/constants';

function simulateSymbolStoreHasNoCache() {
// SymbolStoreDB is a mock, but Flow doesn't know this. That's why we use
Expand Down Expand Up @@ -815,7 +816,7 @@ describe('actions/receive-profile', function () {

expect(
window.fetchMock.callHistory.lastCall(
'https://symbolication.services.mozilla.com/symbolicate/v5'
`${SYMBOL_SERVER_URL}/symbolicate/v5`
)?.options
).toEqual(
expect.objectContaining({
Expand All @@ -833,7 +834,7 @@ describe('actions/receive-profile', function () {

expect(
window.fetchMock.callHistory.lastCall(
'https://symbolication.services.mozilla.com/symbolicate/v5'
`${SYMBOL_SERVER_URL}/symbolicate/v5`
)?.options
).toEqual(
expect.objectContaining({
Expand Down Expand Up @@ -913,7 +914,7 @@ describe('actions/receive-profile', function () {
'https://storage.googleapis.com/profile-store/FAKEHASH',
unsymbolicatedProfile
)
.post('https://symbolication.services.mozilla.com/symbolicate/v5', {});
.post(`${SYMBOL_SERVER_URL}/symbolicate/v5`, {});

simulateSymbolStoreHasNoCache();

Expand All @@ -925,7 +926,7 @@ describe('actions/receive-profile', function () {

expect(
window.fetchMock.callHistory.lastCall(
'https://symbolication.services.mozilla.com/symbolicate/v5'
`${SYMBOL_SERVER_URL}/symbolicate/v5`
)?.options
).toEqual(
expect.objectContaining({
Expand Down Expand Up @@ -1425,7 +1426,7 @@ describe('actions/receive-profile', function () {

expect(
window.fetchMock.callHistory.lastCall(
'https://symbolication.services.mozilla.com/symbolicate/v5'
`${SYMBOL_SERVER_URL}/symbolicate/v5`
)?.options
).toEqual(
expect.objectContaining({
Expand Down
4 changes: 2 additions & 2 deletions src/utils/fetch-assembly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ export async function fetchAssembly(
// local symbol servers. Check the symbol server URL to avoid hammering the
// official Mozilla symbolication server with requests it can't handle.
// This check can be removed once it adds support for /asm/v1.
function _serverMightSupportAssembly(symbolServerUrl: string): boolean {
return isLocalURL(symbolServerUrl);
function _serverMightSupportAssembly(_symbolServerUrl: string): boolean {
return true;
}

// Convert the response from the JSON format into our own DecodedInstruction
Expand Down