On Mon, Oct 9, 2017 at 9:11 PM, <[email protected]> wrote:
> Hi, guys.
>
> I'm having the following assertion failure:
>
> 10-05 11:04:10.654 14154-14154 E/v8: #
> # *Fatal error in
> ../../v8/src/compiler.cc, line 87*
> #
> 10-05 11:04:10.654 14154-14154 E/v8: Debug check failed:
> ThreadId::Current().Equals(compilation_info()->isolate()->thread_id()).
> 10-05 11:04:10.654 14154-14154 E/v8: #
>
> Can anyone explain me what it means?
>
>
The check checks "that we're on the main thread", or, more specifically,
that the current thread is the thread associated to the isolate (which is
the main thread from that V8 instance's point of view). (But based on
below, this is the answer you already knew maybe?)
> I'm working on integration of some third-party product into Chromium
> (Android) that is working in Browser process (main).
> The product uses Chromium's V8 and is creating new Isolate using
> IsolateHolder:
>
> // thread
> thread = new base::Thread("MyProductThread");
> thread->Start();
>
> #ifdef V8_USE_EXTERNAL_STARTUP_DATA
> LOG(WARNING) << "MyProduct: loading v8 snapshot & natives ...";
> gin::V8Initializer::LoadV8Snapshot();
> gin::V8Initializer::LoadV8Natives();
> LOG(WARNING) << "MyProduct: loaded v8 snapshot & natives";
> #endif
>
>
> LOG(WARNING) << "MyProduct: initialize isolate holder";
> gin::IsolateHolder::Initialize(gin::IsolateHolder::kNonStrictMode,
> gin::IsolateHolder::kStableV8Extras,
> gin::ArrayBufferAllocator::SharedInstance
> ());
>
> isolate_holder = new gin::IsolateHolder(
> thread->task_runner(),
> gin::IsolateHolder::AccessMode::kUseLocker);
> isolate_holder->isolate()->Enter();
>
> LOG(WARNING) << "MyProduct: created isolate holder";
>
> // return isolate pointer
> v8::Isolate* isolate = isolate_holder->isolate();
>
> It worked as-is in Aurora project (Qualcomm fork) and i'm completely lost
> why it does not work in pure Chromium.
>
Is the V8 version the same in both? This check was added pretty recently.
> Any suggestion or pointing a direction would be extremely helpful.
>
> Also i've tried to create isolate instance in thread (see the code above)
> in order to put them in the same thread - no luck.
>
Not sure how to read your code snippet; does the code below the thread
creation happen inside the thread? Or this is the setup code for the thread
(which is ran in the main thread)?
--
Google Germany GmbH
Erika-Mann-Straße 33
80636 München
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten
haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter,
löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen,
dass die E-Mail an die falsche Person gesendet wurde.
This e-mail is confidential. If you received this communication by mistake,
please don't forward it to anyone else, please erase all copies and
attachments, and please let me know that it has gone to the wrong person.
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.