在 Chrome 的 --single-process 模式下无法访问 localStorage

发布于 2024-11-06 08:58:17 字数 279 浏览 0 评论 0原文

所以我正在尝试*使用 Chromium 的 --single-process 标志(是的,我知道这是世界上最危险的事情,等等,不需要演讲,谢谢!)与 localStorage ,并且出于某种原因,每当 Chromiums 以单进程模式启动时,localStorage 就不再能够从中访问任何数据。

这背后的原因是什么?有什么办法可以绕过它吗?

(如果这意味着重新编译 Chromium,请告诉我需要修改哪些内容。)

So I'm trying* to use Chromium's --single-process flag (yes, I know it's the most dangerous thing in the world, etc., no need for a lecture, thanks!) with localStorage, and for some reason, it looks like whenever Chromiums is started in single-process mode, localStorage no longer has any data accessible from it.

What's the reason behind this? And is there any way to get around it?

(If that means recompiling Chromium, let me know what I need to modify where.)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

菩提树下叶撕阳。 2024-11-13 08:58:17

我尝试搜索有关您的问题的一些结果,因此我进入了 irc(在 freenode,#chromium 频道),并且因为 rsleevi 没有帐户,所以我刚刚复制了我们的对话:

我:

嘿,有人知道 Chromium 的“--single-process”和 localstorage bug 吗?

斯利维:

<+rsleevi>这个有点宽泛
问题。但简单的答案是
“--single-process”不是“受支持的”
标志 - 它确实是用于
仅由开发人员进行调试。如果
您一般使用/依赖它
使用,那么这就是你的问题:)
<+rsleevi>这是合理预期的
有些事情不起作用或者
在 --single-process 中无法正常工作

在 --single-process Me

是的,我明白这是为了调试
希望,但我只是想知道为什么
localStorage 不能很好地工作
其他东西也可以:)

rsleevi:

<+rsleevi>嗯,答案是因为
--single-process 不受“支持”:-) [13:58:32] <+rsleevi>的设计
新功能总是为
多进程场景。如果发生的话
在 --single-process 中工作,
机缘巧合,如果没有,这就是生活

好的,我明白了。只是想也许
有一些“官方原因”

rsleevi:

<+rsleevi>一般来说,没有,没有
一些决定“我们不想
支持 X in --single-process"...它是
“X 碰巧不起作用?哦,好吧”

<+rsleevi>如果您正在使用
--single-process,意识到(就像信息栏所说的那样)你正在运行
没有所有良好的安全保障
功能,以及您的
配置/功能预计
经常损坏或无法使用。我
实在无法强调
“不支持”方面已经足够了,在
希望也许我可以影响你:-)

我:

不知道你是不是会员
stackoverflow,但我正在努力提供帮助
这位朋友在这里:
在 Chrome 的 --single-process 模式下无法访问 localStorage
,也许你可以回答他的问题(
如果您是会员)
不想拿走你的版权:)

rsleevi:

[14:09:57] <+rsleevi>;呵呵。我不
有一个帐户,听起来像你的朋友
不想听我的演讲,但是
答案就像信息栏所说的那样
“不受支持”:-) marsbear 的第二个
答案是正确的 - 这只是一个
开发助手 [14:10:08] <+rsleevi>
也就是说,Chromium 开发,而不是
通用网络开发

我知道这里没有完整的答案,但也许它会对您有所帮助。

I have tried to search for some results about your issue, so I`v entered the irc (on freenode, #chromium channel) and because rsleevi don't have account I just copied our conversation:

Me:

hey, does anyone knows about Chromium's "--single-process" and localstorage bug ?

rsleevi:

<+rsleevi> That's a bit of a broad
question. But the easy answer is
"--single-process" isn't a "supported"
flag - it truly is intended for
debugging purposes only by devs. If
you're using/relying on it for general
use, then theres your problem :)
<+rsleevi> It's reasonably expected
that a number of things won't work or
won't work right in --single-process

Me:

yes I understand that is for debugging
pupposes, but I just want to know why
localStorage doesn't work well while
other stuff does :)

rsleevi:

<+rsleevi> Well, the answer is because
--single-process isn't "supported" :-) [13:58:32] <+rsleevi> The design of
new features always designs for the
multi-process scenario. If it happens
to work in --single-process,
serendipity, if not, c'est le vie

Me:

OK I understand. Just thought maybe
there is some "offical why"

rsleevi:

<+rsleevi> Generally, no, there's not
some decision "We don't want to
support X in --single-process"... It's
"X doesn't happen to work? Oh well"

<+rsleevi> If you're using
--single-process, realize that (just like the info bar says) you're running
without all the nice security
features, and your
configuration/features are expected to
regularly break or be unusable. I
really can't stress the
"not-supported" aspect enough, in the
hope that maybe I can sway you :-)

Me:

I don't know if you are a memeber on
stackoverflow, but I`m trying to help
this mate here:
localStorage Isn't Accessible in Chrome's --single-process Mode
, maybe you can answer his question (
if you are a member )
Don't want to take your copyrights :)

rsleevi:

[14:09:57] <+rsleevi> Heh. I don't
have an account, sounds like your mate
doesn't want my lecture, but the
answer is just like the info bar says
"unsupported" :-) marsbear's second
answer is right on track - it's just a
development aide [14:10:08] <+rsleevi>
that is, Chromium development, not
general webdev

I know that there isn't a fully answer here, but maybe it will help you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文