profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/nornagon/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Jeremy Rose nornagon @tinyspeck San Francisco, CA https://nornagon.net I work on @electron, and make games sometimes.

apple-opensource-mirror/adv_cmds 0

Mirror of Apple's open source release of adv_cmds

apple-opensource-mirror/amavisd 0

Mirror of Apple's open source release of amavisd

apple-opensource-mirror/am_utils 0

Mirror of Apple's open source release of am_utils

apple-opensource-mirror/apache 0

Mirror of Apple's open source release of apache

apple-opensource-mirror/apache1 0

Mirror of Apple's open source release of apache1

apple-opensource-mirror/apache2 0

Mirror of Apple's open source release of apache2

apple-opensource-mirror/apache_mod_bonjour 0

Mirror of Apple's open source release of apache_mod_bonjour

apple-opensource-mirror/apache_mod_bw 0

Mirror of Apple's open source release of apache_mod_bw

apple-opensource-mirror/apache_mod_dav 0

Mirror of Apple's open source release of apache_mod_dav

apple-opensource-mirror/apache_mod_encoding2 0

Mirror of Apple's open source release of apache_mod_encoding2

PullRequestReviewEvent

Pull request review commentelectron/electron

fix: prevent navigator.fonts.query() from crashing

+// Copyright (c) 2021 Microsoft, Inc.+// Use of this source code is governed by the MIT license that can be+// found in the LICENSE file.++#include <utility>++#include "shell/browser/font/electron_font_access_delegate.h"++#include "base/task/post_task.h"+#include "chrome/browser/browser_process.h"+#include "content/public/browser/browser_task_traits.h"+#include "content/public/browser/font_access_chooser.h"+#include "content/public/browser/render_frame_host.h"++class ElectronFontAccessChooser : public content::FontAccessChooser {+ public:+  explicit ElectronFontAccessChooser(base::OnceClosure close_callback) {+    base::PostTask(+        FROM_HERE, {content::BrowserThread::UI},+        base::BindOnce(+            [](base::OnceClosure closure) { std::move(closure).Run(); },+            std::move(close_callback)));

It seems like you could probably pass std::move(close_callback) here rather than re-wrapping it, yes? i.e.

    base::PostTask(FROM_HERE, {content::BrowserThread::UI}, std::move(close_callback));
codebytere

comment created time in 13 hours

PullRequestReviewEvent

issue closedelectron/remote

TypeError: fs.existsSync is not a function

When calling require("@electron/remote"), I get this error:

Uncaught TypeError: fs.existsSync is not a function
    at getElectronPath (index.js:8)

closed time in 16 hours

paulkoeckdev

issue commentelectron/remote

TypeError: fs.existsSync is not a function

@paulkoeckdev I think something must be wrong with your setup, because @electron/remote never calls fs.existsSync.

Can you provide a small repro that exhibits this behavior, possibly based on electron-quick-start?

paulkoeckdev

comment created time in 16 hours

issue commentelectron/electron

[Bug]: enumerateDevices lost some virtual cameras at production build

You might also try on newer versions of Electron.

mlnchk

comment created time in 16 hours

issue commentelectron/electron

[Bug]: enumerateDevices lost some virtual cameras at production build

Thanks for reporting this and helping to make Electron better!

Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? For example, Electron Fiddle is a great tool for making small test cases and makes it easy to publish your test case to a gist that Electron maintainers can use.

Stand-alone test cases make fixing issues go more smoothly: it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests.

I'm adding the blocked/need-repro label for this reason. After you make a test case, please link to it in a followup comment.

Thanks in advance! Your help is appreciated.

mlnchk

comment created time in 16 hours

PullRequestReviewEvent

PR opened electron/governance

chore: set chair to @jkleinsc
+2 -2

0 comment

1 changed file

pr created time in 16 hours

create barnchelectron/governance

branch : nornagon-patch-1

created branch time in 16 hours

issue commentelectron/remote

Error: @electron/remote >= 2.x is required for Electron >= 14

Should be fixed in 2.0.1. Sorry for the disruption!

gyteng

comment created time in 16 hours

issue closedelectron/remote

Error: @electron/remote >= 2.x is required for Electron >= 14

there is something wrong in initialize function:

if (Number(process.versions.electron.split('.')[0]) >= 14)
    throw new Error('@electron/remote >= 2.x is required for Electron >= 14. See https://github.com/electron/remote/blob/main/docs/migration-2.md for migration instructions.')
  initialized = true

should be: if (Number(process.versions.electron.split('.')[0]) < 14)

https://github.com/electron/remote/blob/main/src/main/server.ts#L362

closed time in 16 hours

gyteng
PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentnornagon/cdda-guide

Apply prettier to repo root

-html, body {-	position: relative;-	width: 100%;-	height: 100%;+html,+body {+  position: relative;+  width: 100%;+  height: 100%; }  body {-	color: #333;-	margin: 0;-	padding: 8px;-	box-sizing: border-box;-	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;+  color: #333;+  margin: 0;+  padding: 8px;+  box-sizing: border-box;+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,+    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; }  a {-	text-decoration: none;+  text-decoration: none; }  a:hover {-	text-decoration: underline;+  text-decoration: underline; }  a:visited {-	color: rgb(0,80,160);+  color: rgb(0, 80, 160); } -a, a:visited {-	color: hsl(122deg, 44%, 61%);+a,+a:visited {+  color: hsl(122deg, 44%, 61%); }  label {-	display: block;+  display: block; } -input, button, select, textarea {-	font-family: inherit;-	font-size: inherit;-	-webkit-padding: 0.4em 0;-	padding: 0.4em;-	margin: 0 0 0.5em 0;-	box-sizing: border-box;-	border: 1px solid #303030;-	background-color: #121212;-	border-radius: 2px;-	color: inherit;+input,+button,+select,+textarea {+  font-family: inherit;+  font-size: inherit;+  -webkit-padding: 0.4em 0;+  padding: 0.4em;+  margin: 0 0 0.5em 0;+  box-sizing: border-box;+  border: 1px solid #303030;+  background-color: #121212;+  border-radius: 2px;+  color: inherit; }  input:focus {-	border: 1px solid #1c62b9;-	outline: none;+  border: 1px solid #1c62b9;+  outline: none; }  input:disabled {-	color: #ccc;+  color: #ccc; }  button {-	color: #333;-	background-color: #f4f4f4;-	outline: none;+  color: #333;+  background-color: #f4f4f4;+  outline: none; }  button:disabled {-	color: #999;+  color: #999; }  button:not(:disabled):active {-	background-color: #ddd;+  background-color: #ddd; }  button:focus {-	border-color: #666;+  border-color: #666; } -.fg_only { background: transparent !important; }+.fg_only {+  background: transparent !important;+} -body { color: var(--cata-color-white); background: var(--cata-color-black); }-td { vertical-align: top; }-table table { margin: -2px; }+body {+  color: var(--cata-color-white);+  background: var(--cata-color-black);+}+td {+  vertical-align: top;+}+table table {+  margin: -2px;+} -ul.comma-separated, ul.no-bullets {-	list-style: none;-	padding: 0;+ul.comma-separated,+ul.no-bullets {+  list-style: none;+  padding: 0; }-ul.comma-separated, ul.comma-separated > li {-	display: inline;+ul.comma-separated,+ul.comma-separated > li {+  display: inline; } ul.comma-separated > li:not(:first-child)::before {-	content: ', '+  content: ", "; } ul.comma-separated.or > li:last-child:not(:first-child)::before {-	content: ' or '+  content: " or "; }  dl {-	display: grid;-	grid-template-columns: max-content auto;-	line-height: 1.4;+  display: grid;+  grid-template-columns: max-content auto;+  line-height: 1.4; } dt {-	grid-column-start: 1;-	text-align: right;-	font-weight: bold;-	color: var(--cata-color-gray);+  grid-column-start: 1;+  text-align: right;+  font-weight: bold;+  color: var(--cata-color-gray); } dd {-	margin-inline-start: 1rem;-	grid-column-start: 2;+  margin-inline-start: 1rem;+  grid-column-start: 2; } -dd ul, dd dl {-	margin: 0;+dd ul,+dd dl {+  margin: 0; } dd ul:not(.comma-separated, .no-bullets) {-	padding-left: 1em;+  padding-left: 1em; }  @media (min-width: 601px) {-.side-by-side {-	display: grid;-	grid-auto-columns: auto;-	grid-column-gap: 1em;-	justify-content: stretch;-}-.side-by-side:not(.no-margin) {-	margin-bottom: 1em;-}-.side-by-side > * { margin: 0; grid-row: 1; }+  .side-by-side {+    display: grid;+    grid-auto-columns: auto;+    grid-column-gap: 1em;+    justify-content: stretch;+  }+  .side-by-side:not(.no-margin) {+    margin-bottom: 1em;+  }+  .side-by-side > * {+    margin: 0;+    grid-row: 1;+  } }  button.disclosure {-	background: none;-	border: none;-	padding: 0;-	margin: 0;-	font-family: inherit;-	color: hsl(122deg, 44%, 61%);-	cursor: pointer;+  background: none;+  border: none;+  padding: 0;+  margin: 0;+  font-family: inherit;+  color: hsl(122deg, 44%, 61%);+  cursor: pointer; } button.disclosure:hover {-	text-decoration: underline;+  text-decoration: underline; } button.disclosure:active {-	background: none;+  background: none; } button.disclosure:focus {-	border: none;+  border: none; }  section {-	background: rgba(255, 255, 255, 5%);-	padding: 1em;-	box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12);-	border-radius: 4px;+  background: rgba(255, 255, 255, 5%);+  padding: 1em;+  box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2),+    0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12);+  border-radius: 4px; } section {-	margin-bottom: 1em;+  margin-bottom: 1em;+}+section > *:last-child {+  margin-bottom: 0;+}+section > *:first-child {+  margin-top: 0; }-section > *:last-child { margin-bottom: 0; }-section > *:first-child { margin-top: 0; } section h1 {-	color: var(--cata-color-dark_gray);-	text-transform: uppercase;-	font-size: 1rem;-	margin: 0;+  color: var(--cata-color-dark_gray);+  text-transform: uppercase;+  font-size: 1rem;+  margin: 0; }  h1:first-child {-	margin-top: 0;+  margin-top: 0; }  pre {-	white-space: pre-wrap;+  white-space: pre-wrap; }  :root {   /*--cata-color-black: rgb(0,0,0);*/   --cata-color-black: #121212;-  --cata-color-red: rgb(255,0,0);-  --cata-color-green: rgb(0,110,0);-  --cata-color-brown: rgb(97,56,28);-  --cata-color-blue: rgb(10,10,220);-  --cata-color-magenta: rgb(139,58,98);-  --cata-color-cyan: rgb(0,150,180);-  --cata-color-gray: rgb(150,150,150);-  --cata-color-dark_gray: rgb(99,99,99);-  --cata-color-light_red: rgb(255,150,150);-  --cata-color-light_green: rgb(0,255,0);-  --cata-color-yellow: rgb(255,255,0);-  --cata-color-light_blue: rgb(100,100,255);-  --cata-color-light_magenta: rgb(254,0,254);-  --cata-color-light_cyan: rgb(0,240,255);-  --cata-color-white: rgb(255,255,255);-}-.c_black { color: var(--cata-color-black); background: var(--cata-color-black); }

same with this block; this is generated output from the generate-color-css.js script.

perhaps this could get moved to a separate file and .prettierignore'd?

hexagonrecursion

comment created time in 17 hours

Pull request review commentnornagon/cdda-guide

Apply prettier to repo root

 // jerry rigged from various cdda sources -black = 0x00;    // RGB{0; 0; 0}-red = 0x01;      // RGB{196; 0; 0}-green = 0x02;    // RGB{0; 196; 0}-yellow = 0x03;   // RGB{196; 180; 30}-blue = 0x04;     // RGB{0; 0; 196}-magenta = 0x05;  // RGB{196; 0; 180}-cyan = 0x06;     // RGB{0; 170; 200}-white = 0x07;    // RGB{196; 196; 196}-color_pairs = {}+black = 0x00; // RGB{0; 0; 0}+red = 0x01; // RGB{196; 0; 0}+green = 0x02; // RGB{0; 196; 0}+yellow = 0x03; // RGB{196; 180; 30}+blue = 0x04; // RGB{0; 0; 196}+magenta = 0x05; // RGB{196; 0; 180}+cyan = 0x06; // RGB{0; 170; 200}+white = 0x07; // RGB{196; 196; 196}+color_pairs = {}; const init_pair = (num, fg, bg) => {-  color_pairs[num] = [fg, bg]-}-    init_pair( 1, white,      black );-    init_pair( 2, red,        black );-    init_pair( 3, green,      black );-    init_pair( 4, blue,       black );-    init_pair( 5, cyan,       black );-    init_pair( 6, magenta,    black );-    init_pair( 7, yellow,     black );+  color_pairs[num] = [fg, bg];+};+init_pair(1, white, black);+init_pair(2, red, black);+init_pair(3, green, black);+init_pair(4, blue, black);+init_pair(5, cyan, black);+init_pair(6, magenta, black);+init_pair(7, yellow, black); -    // Inverted Colors-    init_pair( 8, black,      white );-    init_pair( 9, black,      red );-    init_pair( 10, black,      green );-    init_pair( 11, black,      blue );-    init_pair( 12, black,      cyan );-    init_pair( 13, black,      magenta );-    init_pair( 14, black,      yellow );+// Inverted Colors+init_pair(8, black, white);+init_pair(9, black, red);+init_pair(10, black, green);+init_pair(11, black, blue);+init_pair(12, black, cyan);+init_pair(13, black, magenta);+init_pair(14, black, yellow); -    // Highlighted - blue background-    init_pair( 15, white,      blue );-    init_pair( 16, red,        blue );-    init_pair( 17, green,      blue );-    init_pair( 18, blue,       blue );-    init_pair( 19, cyan,       blue );-    init_pair( 20, black,      blue );-    init_pair( 21, magenta,    blue );-    init_pair( 22, yellow,     blue );+// Highlighted - blue background+init_pair(15, white, blue);+init_pair(16, red, blue);+init_pair(17, green, blue);+init_pair(18, blue, blue);+init_pair(19, cyan, blue);+init_pair(20, black, blue);+init_pair(21, magenta, blue);+init_pair(22, yellow, blue); -    // Red background - for monsters on fire-    init_pair( 23, white,      red );-    init_pair( 24, red,        red );-    init_pair( 25, green,      red );-    init_pair( 26, blue,       red );-    init_pair( 27, cyan,       red );-    init_pair( 28, magenta,    red );-    init_pair( 29, yellow,     red );+// Red background - for monsters on fire+init_pair(23, white, red);+init_pair(24, red, red);+init_pair(25, green, red);+init_pair(26, blue, red);+init_pair(27, cyan, red);+init_pair(28, magenta, red);+init_pair(29, yellow, red); -    init_pair( 30, black,      black );-    init_pair( 31, white,      black );+init_pair(30, black, black);+init_pair(31, white, black); -    init_pair( 32, black,      white );-    init_pair( 33, white,      white );-    init_pair( 34, red,        white );-    init_pair( 35, green,      white );-    init_pair( 36, yellow,     white );-    init_pair( 37, blue,       white );-    init_pair( 38, magenta,    white );-    init_pair( 39, cyan,       white );+init_pair(32, black, white);+init_pair(33, white, white);+init_pair(34, red, white);+init_pair(35, green, white);+init_pair(36, yellow, white);+init_pair(37, blue, white);+init_pair(38, magenta, white);+init_pair(39, cyan, white); -    init_pair( 40, black,      green );-    init_pair( 41, white,      green );-    init_pair( 42, red,        green );-    init_pair( 43, green,      green );-    init_pair( 44, yellow,     green );-    init_pair( 45, blue,       green );-    init_pair( 46, magenta,    green );-    init_pair( 47, cyan,       green );+init_pair(40, black, green);+init_pair(41, white, green);+init_pair(42, red, green);+init_pair(43, green, green);+init_pair(44, yellow, green);+init_pair(45, blue, green);+init_pair(46, magenta, green);+init_pair(47, cyan, green); -    init_pair( 48, black,      yellow );-    init_pair( 49, white,      yellow );-    init_pair( 50, red,        yellow );-    init_pair( 51, green,      yellow );-    init_pair( 52, yellow,     yellow );-    init_pair( 53, blue,       yellow );-    init_pair( 54, magenta,    yellow );-    init_pair( 55, cyan,       yellow );+init_pair(48, black, yellow);+init_pair(49, white, yellow);+init_pair(50, red, yellow);+init_pair(51, green, yellow);+init_pair(52, yellow, yellow);+init_pair(53, blue, yellow);+init_pair(54, magenta, yellow);+init_pair(55, cyan, yellow); -    init_pair( 56, black,      magenta );-    init_pair( 57, white,      magenta );-    init_pair( 58, red,        magenta );-    init_pair( 59, green,      magenta );-    init_pair( 60, yellow,     magenta );-    init_pair( 61, blue,       magenta );-    init_pair( 62, magenta,    magenta );-    init_pair( 63, cyan,       magenta );+init_pair(56, black, magenta);+init_pair(57, white, magenta);+init_pair(58, red, magenta);+init_pair(59, green, magenta);+init_pair(60, yellow, magenta);+init_pair(61, blue, magenta);+init_pair(62, magenta, magenta);+init_pair(63, cyan, magenta); -    init_pair( 64, black,      cyan );-    init_pair( 65, white,      cyan );-    init_pair( 66, red,        cyan );-    init_pair( 67, green,      cyan );-    init_pair( 68, yellow,     cyan );-    init_pair( 69, blue,       cyan );-    init_pair( 70, magenta,    cyan );-    init_pair( 71, cyan,       cyan );+init_pair(64, black, cyan);+init_pair(65, white, cyan);+init_pair(66, red, cyan);+init_pair(67, green, cyan);+init_pair(68, yellow, cyan);+init_pair(69, blue, cyan);+init_pair(70, magenta, cyan);+init_pair(71, cyan, cyan);  function color_pair(i) {   return {     fg: color_pairs[i][0],     bg: color_pairs[i][1],-    bold() { return {...this, is_bold: true} },-    blink() { return {...this, is_blink: true} },+    bold() {+      return { ...this, is_bold: true };+    },+    blink() {+      return { ...this, is_blink: true };+    },     is_bold: false,     is_blink: false,     color() {-       let fg = this.fg;       let bg = this.bg;-      if (this.is_bold)-        fg = fg + 8;-      if (this.is_blink)-        bg = bg + 8;-      return { fg, bg }-    }-  }+      if (this.is_bold) fg = fg + 8;+      if (this.is_blink) bg = bg + 8;+      return { fg, bg };+    },+  }; } -all_colors = {}+all_colors = {}; function add_color(def, name, pair, inverse) {   all_colors[name] = {     ...pair.color(),-    inverse-  }+    inverse,+  }; } -    add_color( "def_c_black", "c_black", color_pair( 30 ), "def_i_black" );-    add_color( "def_c_white", "c_white", color_pair( 1 ).bold(), "def_i_white" );-    add_color( "def_c_light_gray", "c_light_gray", color_pair( 1 ), "def_i_light_gray" );-    add_color( "def_c_dark_gray", "c_dark_gray", color_pair( 30 ).bold(), "def_i_dark_gray" );-    add_color( "def_c_red", "c_red", color_pair( 2 ), "def_i_red" );-    add_color( "def_c_green", "c_green", color_pair( 3 ), "def_i_green" );-    add_color( "def_c_blue", "c_blue", color_pair( 4 ), "def_i_blue" );-    add_color( "def_c_cyan", "c_cyan", color_pair( 5 ), "def_i_cyan" );-    add_color( "def_c_magenta", "c_magenta", color_pair( 6 ), "def_i_magenta" );-    add_color( "def_c_brown", "c_brown", color_pair( 7 ), "def_i_brown" );-    add_color( "def_c_light_red", "c_light_red", color_pair( 2 ).bold(), "def_i_light_red" );-    add_color( "def_c_light_green", "c_light_green", color_pair( 3 ).bold(), "def_i_light_green" );-    add_color( "def_c_light_blue", "c_light_blue", color_pair( 4 ).bold(), "def_i_light_blue" );-    add_color( "def_c_light_cyan", "c_light_cyan", color_pair( 5 ).bold(), "def_i_light_cyan" );-    add_color( "def_c_pink", "c_pink", color_pair( 6 ).bold(), "def_i_pink" );-    add_color( "def_c_yellow", "c_yellow", color_pair( 7 ).bold(), "def_i_yellow" );+add_color("def_c_black", "c_black", color_pair(30), "def_i_black");

can we prettier-ignore this block? it's copy/pasted and tweaked from src/color.cpp: https://github.com/CleverRaven/Cataclysm-DDA/blob/d978eeb966150794689ea1216d18f00828abc683/src/color.cpp#L214

hexagonrecursion

comment created time in 17 hours

push eventelectron/remote

Gu

commit sha 74453a7d734c41dbe623cc4c701fb761cedea198

fix: remove electron version check in 2.x version (#77)

view details

push time in 17 hours

PR merged electron/remote

fix: remove electron version check in 2.x version

no need to check electron verison in 2.x

https://github.com/electron/remote/issues/76

+0 -2

2 comments

1 changed file

gyteng

pr closed time in 17 hours

PullRequestReviewEvent

Pull request review commentelectron/electron

feat: add support for WebHID

 describe('navigator.hid', () => {       expect(grantedDevices).to.not.be.empty();       const altFixturesPath = path.resolve(__dirname, 'fixtures');       w.loadFile(path.join(altFixturesPath, 'blank.html'));-      await emittedOnce(w.webContents, 'did-navigate');-      const grantedDevicesOnNewPage = await w.webContents.executeJavaScript('navigator.hid.getDevices()');-      expect(grantedDevicesOnNewPage).to.be.empty();+      const [,,,,, frameProcessId, frameRoutingId] = await emittedOnce(w.webContents, 'did-frame-navigate');+      const frame = webFrameMain.fromId(frameProcessId, frameRoutingId);+      expect(frame).to.not.be.empty();+      if (frame) {

frame is always truthy because of the expect on the previous line, yes?

jkleinsc

comment created time in 18 hours

PullRequestReviewEvent

issue commentelectron/electron

[Bug]: Mouse clicks on target="_blank" links inside webview don't seem to give an event

Thinking about this a little more, I think we should actually suppress the new-window event (and the call to the window-open handler) for cmd+click when allowpopups is false. It makes the most sense to have the allowpopups=no mean "this webview is never allowed to spawn a new window", and also to have new-window mean "we are about to create a new window".

In the non-nativeWindowOpen situation, "new-window" does not always indicate that a new window will be created, since if allowpopups=no is set, the window creation will be suppressed.

In the nativeWindowOpen situation, the above is true only for cmd+click events—for regular clicks on _blank links and for window.open() calls, there is no event emitted.

Roughly speaking, allowpopups=no should be equivalent to setWindowOpenHandler(() => ({action: 'deny'})).

If your goal is to intercept the creation of new windows, the right way to go is to set allowpopups and install a window-open handler via setWindowOpenHandler. The disposition parameter in the event details can help to distinguish between various kinds of window open events.

The change we should make, then, is to stop emitting new-window / calling the window-open handler when cmd+clicking in a webview with allowpopups=no.

Jelmerro

comment created time in a day

push eventnornagon/cdda-guide

Jeremy Rose

commit sha cbf7f0ff8a84f545cb77cfcbe7ce56406621c076

type more things

view details

push time in a day

Pull request review commentelectron/electron

fix: prevent navigator.fonts.query() from crashing

+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001+From: Shelley Vohr <shelley.vohr@gmail.com>+Date: Mon, 13 Sep 2021 16:06:52 +0200+Subject: Fix: font access chooser DCHECK++This patch is necessary to prevent a crash when navigator.fonts.query()+in the intermediary period prior to Electron actually implementing the+feature. Chromium relies on a user choice via a UI they pop up to run+the callback, and in contrast we don't really have a way to run the+closure post-construction of the FontAccessChooser and therefore must+run it in the constructor, which makes it such that+FontAccessManagerImpl::DidChooseLocalFonts runs before the FontAccessChooser+is assigned in the choosers_ map and DCHECKS.++As we don't yet have a standardized permissions model+for this and similar APIs, this just mediates the crash and adds+appropriate simple scaffolding for a proper implementation.++diff --git a/content/browser/font_access/font_access_manager_impl.cc b/content/browser/font_access/font_access_manager_impl.cc+index 518854d5370cdb5dc5131ad47442ac2bc748eae5..8b2b6ab23d1d12a0bb202dd1227ba5a28236a934 100644+--- a/content/browser/font_access/font_access_manager_impl.cc++++ b/content/browser/font_access/font_access_manager_impl.cc+@@ -262,8 +262,8 @@ void FontAccessManagerImpl::DidChooseLocalFonts(+   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);+ +   // The chooser has fulfilled its purpose. It's safe to dispose of it.+-  size_t erased = choosers_.erase(frame_id);+-  DCHECK_EQ(erased, 1u);++  // size_t erased = choosers_.erase(frame_id);++  // DCHECK_EQ(erased, 1u);

can we delay the event with PostTask or similar? as is, the choosers_ map will grow without bound.

codebytere

comment created time in 2 days

PullRequestReviewEvent

pull request commentCleverRaven/Cataclysm-DDA

don't load body part drench_capacity twice

The other load is here: https://github.com/CleverRaven/Cataclysm-DDA/blob/3c8f5b593a675eb0599e61195d7021b4c4b43ea0/src/bodypart.cpp#L236

nornagon

comment created time in 2 days

PR opened CleverRaven/Cataclysm-DDA

don't load body part drench_capacity twice

<!-- HOW TO USE: Under each "#### Heading" below, enter information relevant to your pull request. Leave the headings unless they don't apply to your PR.

Please read carefully and don't delete the comments delimited by "< !--" and "-- >" Once a pull request is submitted automatic stylistic and consistency checks will be performed on the PR's changes. The results of these can be either seen under the "Files changed" section of a PR or in the check's details.

NOTE: Please grant permission for repository maintainers to edit your PR. It is EXTREMELY common for PRs to be held up due to trivial changes being requested and the author being unavailable to make them. -->

Summary

None <!-- This section should consist of exactly one line, edit the one above. Category must be one of these: Features, Content, Interface, Mods, Balance, Bugfixes, Performance, Infrastructure, Build, I18N. Or replace the whole line with just the word None for no changelog entry. For more on the meaning of each category, see: https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/CHANGELOG_GUIDELINES.md If approved and merged, your summary will be added to the project changelog: https://github.com/CleverRaven/Cataclysm-DDA/blob/master/data/changelog.txt -->

Purpose of change

<!-- With a few sentences, describe your reasons for making this change. If it relates to an existing issue, you can link it with a # followed by the GitHub issue number, like #1234. If your pull request fully resolves an issue, include the word "Fix" or "Fixes" before the issue number, like: Fixes #1234. If there is no related issue, explain here what issue, feature, or other concern you are addressing. If this is a bugfix, include steps to reproduce the original bug, so your fix can be verified. --> Cleans up body_part loading to not load drench_max twice

Describe the solution

<!-- How does the feature work, or how does this fix a bug? The easier you make your solution to understand, the faster it can get merged. --> Remove the duplicate load

Describe alternatives you've considered

<!-- Explain any alternative solutions, different approaches, or possibilities you've considered using to solve the same problem. --> NA

Testing

<!-- Describe what steps you took to test that this PR resolved the bug or added the feature, and what tests you performed to make sure it didn't cause any regressions. Also include testing suggestions for reviewers and maintainers. --> NA

Additional context

<!-- Add any other context (such as mock-ups, proof of concepts or screenshots) about the feature or bugfix here. -->

+0 -1

0 comment

1 changed file

pr created time in 2 days

push eventnornagon/Cataclysm-DDA

Jeremy Rose

commit sha 3c8f5b593a675eb0599e61195d7021b4c4b43ea0

don't load body part drench_capacity twice

view details

push time in 2 days

push eventelectron/remote

Jeremy Rose

commit sha 4bf63f8f791f9d511148d68b6e1b50a08f8638b3

fix: change enableRemoteModule to .enable() for electron@14 (#72) BREAKING CHANGE: This removes the `enableRemoteModule` option in favor of a new `.enable()` method for enabling the remote module on a particular WebContents. See https://github.com/electron/remote/blob/main/docs/migration-2.md for migration instructions. This is an empty commit for forcing a release after a semantic-release failure in fd928e5.

view details

push time in 2 days

push eventelectron/remote

Artur Morys - Magiera

commit sha fd928e5e63e10d8215f24cca6aa377ee689759f6

fix!: change enableRemoteModule to .enable() for electron@14 (#72) Co-authored-by: Jeremy Rose <nornagon@nornagon.net>

view details

push time in 2 days