v8

【U盘刷机】小米路由器变砖如何100%刷机成功

一个人想着一个人 提交于 2019-12-04 09:51:46
【U盘刷机】小米路由器变砖如何100%刷机成功 楼主 8919385 | 2015-11-9 14:19 | 来自PC | 复制 | | 跳转 本帖最后由 lymydn 于 2015-11-9 14:29 编辑 以前没刷过,从头开始看,以前刷过不成功,基本步骤知道,直接看后面 小米路由器系列产品均采用“AB双系统+安全恢复系统”的三重保障机制来确保系统的稳定运行与数据的安全。因此,小米路由器只有在硬盘故障或系统遇到严重问题时才会无法启动。 特别注意: 如果您的小米路由mini处于正常状态,请尽量利用每周OTA进行升级。 如需切换ROM版本,请前往Miwifi.com下载页面直接下载ROM包,使用“手动升级”完成刷机。 本期带来的get√新技能:U盘刷机—小米路由器变砖之后如何自救 本教程只针对出现下述情况无法正常启动的情况,才需要用到的U盘刷机恢复。 重要的事情说三遍:U盘刷机时会清空硬盘上的数据!会清空硬盘上的数据!!会清空硬盘上的数据!!! 当小米路由器无法启动时候,会有两种状态: 1. 路由器指示灯显示为红色常亮 此时,路由器已经遇到严重问题导致AB+安全恢复系统均无法启动。 对于小米路由器硬盘版(R1D)、小米路由器mini(R1C)和全新小米路由器硬盘版(R2D)来说,这种情况下都需要通过U盘刷机来解决。如果U盘刷机无法解决,请联系售后进行返厂处理。 2.

locate corresponding JS source of code which is not optimized by V8

馋奶兔 提交于 2019-12-04 08:58:27
I try to optimize the performance of a node.js application and therefore I am analyzing the behavior of V8's JIT compiler. When running the application via node --trace_deopt --trace_opt --code_comments --print_optcode ... , the output contains many recurring lines like the following: [didn't find optimized code in optimized code map for 0x490a8b4aa69 <SharedFunctionInfo>] How can I find out which javascript code corresponds to 0x490a8b4aa69 ? The full output is available here . TylerY86 That error message used to be around line 10200 of v8/src/objects.cc , but is no more. It basically means

How do you free a wrapped C++ object when associated Javascript object is garbage collected in V8?

江枫思渺然 提交于 2019-12-04 07:51:14
问题 V8's documentation explains how to create a Javascript object that wraps a C++ object. The Javascript object holds on to a pointer to a C++ object instance. My question is, let's say you create the C++ object on the heap, how can you get a notification when the Javascript object is collected by the gc, so you can free the heap allocated C++ object? 回答1: The trick is to create a Persistent handle (second bullet point from the linked-to API reference: " Persistent handles are not held on a

NodeJS: calling global.gc() doesn't reduce memory to minimum?

梦想与她 提交于 2019-12-04 06:23:52
To investigate memory leaks, I have setup a route that triggers global.gc() at every POST /gc app.post('/gc', function(req, res){ global.gc(); }); However, I've noticed that if I spam this request, it reduces the memory usage more and more each time. Shouldn't calling global.gc() once is enough to reduce the memory to minimum ? If so, why does calling multiple times consecutively reduces memory at every call ? (I'm using Node.js v0.12) At a very high level, V8 splits up GC into two parts. Looking for garbage to collect, and actually collecting the garbage. Calling gc() only does the second

In V8, how are primitive types such as null, undefined, and boolean stored in memory?

回眸只為那壹抹淺笑 提交于 2019-12-04 05:29:29
问题 Is a boolean stored as a 32-byte integer in memory? How about a null value? In the book Speaking Javascript, it refers to a type tag being used to indicate the type of a value stored in memory. e.g. The type tag for Object type was 000. What is a type tag? How would I find the type tag of a value type such as a boolean or string ? 回答1: From Andy Wingo's blog post on the topic: Initially, all JavaScript implementations used tagged pointers to represent JS values. This is a old trick that comes

How do i access v8 parse tree how can it be done?

假装没事ソ 提交于 2019-12-04 04:20:54
I like to take the v8 engine and to transform its code to other programming language based on this for example if i understand it right first step i need to get the parse tree my question is : can i get it already from v8 or do i need to generate it from the js code . what is the easer way ? It looks hard to get the AST (Annotated Syntax Tree, the Parse tree) from V8 itself but there are plenty of other parsers for JavaScript that will do what you're looking for. I'd recommend having a look at Esprima ( http://esprima.org/ ) which is a JavaScript parser written in JavaScript. This allows you

Strange sorting of array when using Array.prototype.sort in Chrome

折月煮酒 提交于 2019-12-04 04:02:03
问题 I have found an oddity when using Array.prototype.sort() on an array of numbers and I'm not sure what's causing it. My goal is to reverse an array using sort (not using reverse ) so I can chain it like so: const shouldReverse = Math.random() > 0.5, result = foo().bar().map(...).reverseIf(shouldReverse); I believe I should be able to achieve this using sort , which seems to work in some cases but not others. Here is a working example: const myArray = ['a', 'b', 'c', 'd'], mySortedArray =

How to handle V8 engine crash when process runs out of memory

一曲冷凌霜 提交于 2019-12-04 03:48:59
Both node console and Qt5's V8-based QJSEngine can be crashed by the following code: a = []; for (;;) { a.push("hello"); } node's output before crash: FATAL ERROR: JS Allocation failed - process out of memory QJSEngine 's output before crash: # # Fatal error in JS # Allocation failed - process out of memory # If I run my QJSEngine test app (see below) under a debugger, it shows a v8::internal::OS::DebugBreak call inside V8 code. If I wrap the code calling QJSEngine::evaluate into __try-__except ( SEH ), then the app won't crash, but this solution is Windows-specific. Question: Is there a way

Can Javascript be considered a interpreted language when using Google Chrome (V8)?

北城以北 提交于 2019-12-04 03:22:44
问题 I was reading this excellent article on V8, Google's Javascript engine: https://developers.google.com/v8/design#mach_code. At one point, they say that Javascript is compiled directly into machine language, without any bytecode or an interpreter. To quote: V8 compiles JavaScript source code directly into machine code when it is first executed. There are no intermediate byte codes, no interpreter. So, why is Javascript still listed along with the "scripting" and "interpreted" languages, when it

How to add a new class to Google V8?

一曲冷凌霜 提交于 2019-12-04 02:24:33
I'm a new comer in Google V8 and Javascript, and I'm trying to add a new class to Javascript using C++. I've finished some work using Webkit's V8 binding, references are: webkit idl and v8 binding Now I want to integrate it into V8 engine directly, by modifying V8's code instead of simply using V8's api to make a extension. In other words, I want to add a new class just like Array type in Javascript, using the same implementation mechanism. I've searched the Internet, including docs in Google, but have only seen guides on embedding V8 with native code. Where can I find guides about modifying